-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update workflow for semantic versioning
- Loading branch information
Karol Dzitkowski
committed
Feb 4, 2023
1 parent
5dbcfe0
commit 20c7c1d
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |