ci: fix skip-on-empty #17
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: Build and Publish NuGet Package | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
changelog: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.changelog.outputs.version }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Generate Changelog | |
id: changelog | |
uses: TriPSs/conventional-changelog-action@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
skip-on-empty: "false" | |
publish: | |
runs-on: ubuntu-latest | |
needs: changelog | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0 | |
- name: Restore Dependencies | |
run: dotnet restore | |
- name: Pack NuGet Package | |
run: | | |
echo "VERSION> ${{ needs.changelog.outputs.version }}" && \ | |
dotnet pack OpenLabel/ \ | |
--configuration Release \ | |
/p:PackageVersion=${{ needs.changelog.outputs.version }} \ | |
-o packages | |
- name: Publish NuGet Package | |
run: dotnet nuget push packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json |