{"id":22408350,"url":"https://github.com/phmatray/buildsphere","last_synced_at":"2025-03-27T01:44:13.934Z","repository":{"id":263123338,"uuid":"861065488","full_name":"phmatray/BuildSphere","owner":"phmatray","description":"A dotnet tool that lets me deliver my libs","archived":false,"fork":false,"pushed_at":"2024-11-16T11:37:12.000Z","size":706,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T07:27:55.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phmatray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-21T22:52:19.000Z","updated_at":"2024-12-05T07:51:32.000Z","dependencies_parsed_at":"2024-11-16T14:16:59.270Z","dependency_job_id":null,"html_url":"https://github.com/phmatray/BuildSphere","commit_stats":null,"previous_names":["phmatray/buildsphere"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmatray%2FBuildSphere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmatray%2FBuildSphere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmatray%2FBuildSphere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmatray%2FBuildSphere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phmatray","download_url":"https://codeload.github.com/phmatray/BuildSphere/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245767274,"owners_count":20668822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T11:17:21.532Z","updated_at":"2025-03-27T01:44:13.912Z","avatar_url":"https://github.com/phmatray.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BuildSphere\n\n![Build Status](https://img.shields.io/github/actions/workflow/status/phmatray/BuildSphere/build.yml?branch=main\u0026label=build) ![NuGet](https://img.shields.io/nuget/v/BuildSphere) ![License](https://img.shields.io/github/license/phmatray/BuildSphere)\n\nBuildSphere is a powerful and intuitive .NET global build tool designed to streamline the building and deployment of .NET applications to NuGet and GitHub. Leveraging modern tools like Nuke, MinVer, and Git-Cliff, BuildSphere simplifies your development workflow, ensuring consistent and efficient builds across all your projects.\n\n## Table of Contents\n\n- [Features](#features)\n- [Dependencies](#dependencies)\n- [Installation](#installation)\n    - [Prerequisites](#prerequisites)\n    - [Install BuildSphere as a Local Tool](#install-buildsphere-as-a-local-tool)\n    - [Install BuildSphere as a Global Tool](#install-buildsphere-as-a-global-tool)\n- [Configuration](#configuration)\n- [Usage](#usage)\n    - [Generating the Changelog](#generating-the-changelog)\n    - [Building and Deploying](#building-and-deploying)\n- [Continuous Integration](#continuous-integration)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n\n## Features\n\n- **Global and Local Tool Support:** Install BuildSphere globally for system-wide access or locally within specific repositories.\n- **Automated Changelog Generation:** Utilize Git-Cliff to automatically generate and update your `CHANGELOG.md`.\n- **Versioning with MinVer:** Automatically manage your project versions based on your Git history.\n- **Seamless Deployment:** Easily build and deploy your .NET applications to NuGet and GitHub.\n- **Consistent Builds with Nuke:** Leverage Nuke's robust build automation capabilities for reliable and repeatable builds.\n\n## Dependencies\n\nBuildSphere relies on the following tools:\n\n- [.NET SDK](https://dotnet.microsoft.com/download) (version 9.0 or later)\n- [Nuke](https://nuke.build/) - A modern build automation system for .NET.\n- [MinVer](https://github.com/adamralph/minver) - Automatic semantic versioning using Git tags.\n- [Git-Cliff](https://github.com/orhun/git-cliff) - A Git-based changelog generator.\n\n## Installation\n\n### Prerequisites\n\nEnsure you have the following installed on your machine:\n\n- [.NET SDK](https://dotnet.microsoft.com/download) (version 9.0 or later)\n- [Git](https://git-scm.com/downloads)\n- [Git-Cliff](https://github.com/orhun/git-cliff) (Install via Homebrew, Scoop, or other package managers)\n\n### Install BuildSphere as a Local Tool\n\n1. **Clone the Repository:**\n\n   ```bash\n   git clone https://github.com/phmatray/BuildSphere.git\n   cd BuildSphere\n   ```\n\n2. **Pack the Tool:**\n\n   Navigate to the `./build` directory and create a NuGet package.\n\n   ```bash\n   cd build\n   dotnet pack -c Release\n   ```\n\n   The NuGet package (`BuildSphere.0.3.0.nupkg`) will be available in the `./.nupkg` directory.\n\n3. **Install as a Local Tool:**\n\n   From your project directory where you want to use BuildSphere:\n\n   ```bash\n   dotnet new tool-manifest # If you don't have a tool manifest yet\n   dotnet tool install --add-source ../BuildSphere/.nupkg BuildSphere\n   ```\n\n   \u003e **Note:** Replace `../BuildSphere/.nupkg` with the relative or absolute path to the `.nupkg` file if your directory structure differs.\n\n### Install BuildSphere as a Global Tool\n\n1. **Pack the Tool:**\n\n   As above, ensure you've created the NuGet package in the `./.nupkg` directory.\n\n2. **Install as a Global Tool:**\n\n   ```bash\n   dotnet tool install -g --add-source ./build/.nupkg BuildSphere\n   ```\n\n   \u003e **Note:** Adjust the `--add-source` path as necessary based on where your `.nupkg` file is located.\n\n3. **Verify Installation:**\n\n   ```bash\n   build-sphere --version\n   ```\n\n   You should see the installed version of BuildSphere.\n\n## Configuration\n\n### GitHub Secret for NuGet API Key\n\nTo enable BuildSphere to deploy packages to NuGet, you need to set up a GitHub secret:\n\n1. **Navigate to Your Repository's Settings:**\n\n   Go to your GitHub repository, click on `Settings` \u003e `Secrets and variables` \u003e `Actions`.\n\n2. **Add a New Secret:**\n\n    - **Name:** `NUGET_API_KEY`\n    - **Value:** Your NuGet API key.\n\n   ![Add GitHub Secret](https://docs.github.com/assets/images/help/repository/repo-actions-secrets-add.png)\n\n   \u003e **Note:** Keep your API keys secure and never expose them in your code or logs.\n\n### Git-Cliff Configuration\n\nBuildSphere uses Git-Cliff to generate changelogs based on your Git commit history. The configuration is embedded within the tool, ensuring consistency across all projects.\n\nIf you need to customize `git-cliff.toml`, modify the embedded resource in the BuildSphere project and rebuild the tool.\n\n## Usage\n\nBuildSphere provides a suite of commands to automate your build and deployment processes.\n\n### All tasks in a glance\n\n![BuildSphere Tasks](./tasks.png)\n\n### Generating the Changelog\n\nTo generate or update the `CHANGELOG.md` using Git-Cliff:\n\n```bash\nbuild-sphere GenerateChangeLog\n```\n\n**Steps Performed:**\n\n1. **Validates** that Git-Cliff is installed and accessible.\n2. **Retrieves** the embedded `git-cliff.toml` configuration.\n3. **Generates** or updates the `CHANGELOG.md` based on commit history.\n4. **Commits** the updated changelog if changes are detected.\n\n### Building and Deploying\n\nTo build your project and deploy it to NuGet and GitHub:\n\n```bash\nbuild-sphere BuildAndDeploy\n```\n\n**Steps Performed:**\n\n1. **Restores** NuGet packages.\n2. **Builds** the project in Release mode.\n3. **Runs** tests to ensure code quality.\n4. **Packages** the application for deployment.\n5. **Pushes** the package to NuGet and GitHub Releases.\n\n\u003e **Note:** Ensure that your GitHub Actions or CI/CD pipelines have access to the necessary secrets and configurations.\n\n## Continuous Integration\n\nIntegrate BuildSphere into your CI/CD pipelines to automate builds and deployments.\n\n### GitHub Actions Example\n\nHere's an example of how to set up GitHub Actions to use BuildSphere:\n\n```yaml\nname: Build and Deploy\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout Repository\n        uses: actions/checkout@v3\n\n      - name: Setup .NET\n        uses: actions/setup-dotnet@v3\n        with:\n          dotnet-version: '8.0.x'\n\n      - name: Install BuildSphere\n        run: dotnet tool install -g --add-source ./build/.nupkg BuildSphere\n        env:\n          DOTNET_CLI_HOME: ${{ runner.temp }}\n\n      - name: Add .NET Tools to PATH\n        run: echo \"${HOME}/.dotnet/tools\" \u003e\u003e $GITHUB_PATH\n\n      - name: Generate Changelog\n        run: build-sphere GenerateChangeLog\n\n      - name: Build and Deploy\n        run: build-sphere BuildAndDeploy\n        env:\n          NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n\u003e **Note:** Adjust the `--add-source` path based on where your `.nupkg` file is located.\n\n## Contributing\n\nContributions are welcome! Whether it's reporting bugs, suggesting features, or submitting pull requests, your input helps make BuildSphere better.\n\n### How to Contribute\n\n1. **Fork the Repository:**\n\n   Click the `Fork` button at the top-right corner of the repository page.\n\n2. **Clone Your Fork:**\n\n   ```bash\n   git clone https://github.com/phmatray/BuildSphere.git\n   cd BuildSphere\n   ```\n\n3. **Create a New Branch:**\n\n   ```bash\n   git checkout -b feature/YourFeatureName\n   ```\n\n4. **Make Your Changes:**\n\n   Implement your feature or bug fix.\n\n5. **Commit Your Changes:**\n\n   ```bash\n   git commit -m \"feat: YourFeatureName\"\n   ```\n\n6. **Push to Your Fork:**\n\n   ```bash\n   git push origin feature/YourFeatureName\n   ```\n\n7. **Open a Pull Request:**\n\n   Navigate to the original repository and click `Compare \u0026 pull request`.\n\n### Code of Conduct\n\nPlease adhere to the [Code of Conduct](CODE_OF_CONDUCT.md) in all interactions.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Contact\n\nFor any questions or feedback, feel free to reach out:\n\n- **GitHub Issues:** [BuildSphere Issues](https://github.com/phmatray/BuildSphere/issues)\n\n---\n\nMade with ❤️ by [Philippe Matray](https://github.com/phmatray)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphmatray%2Fbuildsphere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphmatray%2Fbuildsphere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphmatray%2Fbuildsphere/lists"}