Skip to content

Commit

Permalink
Update workflow for semantic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Karol Dzitkowski committed Feb 4, 2023
1 parent 5dbcfe0 commit 20c7c1d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,32 @@ jobs:
run: dotnet pack --configuration Release
- name: Publish the package to GPR
run: dotnet nuget push bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN --skip-duplicate

semantic-release:
needs: build
name: Create a Package Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
- name: Create Nuget Package
run: dotnet build -c Release && dotnet pack -c Release -p:PackageVersion=${{ steps.tag_version.outputs.new_version }} -o .
- name: Upload Package for Publishing
uses: actions/upload-artifact@v3
with:
name: PackedLib
path: ./*.nupkg

0 comments on commit 20c7c1d

Please sign in to comment.