Skip to content

Commit

Permalink
ci: add release build
Browse files Browse the repository at this point in the history
  • Loading branch information
shuebner committed Aug 6, 2023
1 parent 19d0061 commit ca81dfe
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish nuget package

on:
push:
tags: v*

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Get version from tag
id: get_version
# "refs/tags/v" is 11 characters
run: |
versionNumber=${GITHUB_REF:11}
echo "::set-output name=version_number::$versionNumber"
- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3

- name: Create nuget package
run: dotnet pack -c Release package -o _out -p:Version=${{ steps.get_version.outputs.version_number }}

- name: Push nuget package to nuget.org
run: dotnet nuget push _out/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

0 comments on commit ca81dfe

Please sign in to comment.