0.1.1 #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Library | |
# When a release is published | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get version | |
run: | | |
echo "VERSION=${{ github.event.release.tag_name }}" >> $env:GITHUB_ENV | |
echo "Building with ${{ env.VERSION }}" | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore -p:Version=${{ env.VERSION }} | |
- name: Pack | |
run: dotnet pack .\Compressonator.NET.csproj --output nupkgs --configuration Release -p:Version=${{ env.VERSION }} | |
- name: Nuget Publish | |
run: dotnet nuget push nupkgs\*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json |