-
name: ci on: push: branches: [main] jobs: generate-version: runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/checkout@v2 - name: GitHub Tag Bump id: tab_bump uses: anothrNick/[email protected] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} INITIAL_VERSION: 1.0.0 DEFAULT_BUMP: patch outputs: new_version: ${{ steps.tab_bump.outputs.new_tag }} package-and-publish-lib: runs-on: ubuntu-latest needs: generate-version steps: - uses: actions/checkout@v2 - name: Setup .NET uses: actions/setup-dotnet@v1 with: dotnet-version: 8.0.x - name: Generate NuGet package run: | dotnet pack MyAmazingLogger/ \ --configuration Release \ -p:PackageVersion=${{ needs.generate-version.outputs.new_version }} \ -p:RepositoryUrl=https://github.com/RafaelJCamara/YT-Nuget-Pkg-Release \ -o packages - name: Publish NuGet package run: dotnet nuget push packages/*.nupkg --api-key ${{ secrets.PUSH_NUGET }} --source https://nuget.pkg.github.com/RafaelJCamara/index.json
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
To help us on this task we are using an action called anothrNick/github-tag-action.
-
We know that our packages need to have a version. This version follows a format called semantic versioning. This is where the job called generate-version comes in. The output of this job is a version number that will be used when we publish our package in the package-and-publish-lib job.