Skip to content

Commit

Permalink
feat(CI): add package-publish.yml (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang authored Sep 21, 2023
1 parent 4e1a421 commit d276a71
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/package-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Packages Publish
on:
release:
types: [created]

jobs:
nuget-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@master

- name: Set up dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x

- name: Pack
run: dotnet pack -c Release -o ./nuget

- name: Publish
run: dotnet nuget push "./nuget/*.nupkg" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
2 changes: 1 addition & 1 deletion build/version.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<VersionMajor>4</VersionMajor>
<VersionMinor>1</VersionMinor>
<VersionPatch>65</VersionPatch>
<VersionPatch>66</VersionPatch>
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
</PropertyGroup>
</Project>

0 comments on commit d276a71

Please sign in to comment.