Skip to content

Merge branch 'master' of https://github.com/Dwarf1er/openlabel #20

Merge branch 'master' of https://github.com/Dwarf1er/openlabel

Merge branch 'master' of https://github.com/Dwarf1er/openlabel #20

Workflow file for this run

name: Build and Publish NuGet Package
on:
push:
branches:
- master
jobs:
changelog:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.changelog.outputs.version }}
tag: ${{ steps.changelog.outputs.tag }}
changelog_text: ${{ steps.changelog.outputs.changelog }}
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"
git-push: "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
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: "Release ${{ needs.changelog.outputs.tag }}"
body: ${{ needs.changelog.outputs.changelog_text }}
tag_name: ${{ needs.changelog.outputs.tag }}
files: packages/*.nupkg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}