Skip to content

Commit

Permalink
Add release step in CI for pushing to NuGet.org
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkerm committed Oct 15, 2023
1 parent ca4a3b2 commit 04623c8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,28 @@ jobs:
- name: Uninstall Template
working-directory: ./
run: dotnet new uninstall Mikeware.GoDotNet.BlankTemplate

release:
if: ${{ startsWith(github.ref, 'refs/heads/rel/') }}
needs: [Build-Template-Package]
runs-on: ubuntu-latest

steps:
- name: Install .NET SDK v${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Download signed packages for ${{ matrix.platform }}
uses: actions/download-artifact@v3.0.2
with:
name: nuget-package
path: ./template

- name: Push to NuGet.org
run: >
dotnet nuget push
./template/**/*.nupkg
--source https://api.nuget.org/v3/index.json
--api-key ${{ secrets.NUGET_PACKAGE_PUSH_TOKEN }}
--skip-duplicate

0 comments on commit 04623c8

Please sign in to comment.