Skip to content

Commit

Permalink
Release to NuGet whenever a version number tag is pushed.
Browse files Browse the repository at this point in the history
  • Loading branch information
plioi committed Jun 27, 2020
1 parent a377e59 commit c34693d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build and Test
run: pwsh ./build.ps1
- name: Release to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: pwsh ./release.ps1
2 changes: 2 additions & 0 deletions release.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dotnet nuget push artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key $env.NUGET_API_KEY
if ($lastexitcode -ne 0) { throw $lastexitcode }

0 comments on commit c34693d

Please sign in to comment.