Skip to content

Commit

Permalink
👷🏻 Automatically create GitHub release after nuspec version change (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hona authored Mar 20, 2024
1 parent f95a04c commit b43d7a2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
publish:
name: Publish to NuGet.org
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2

Expand All @@ -22,3 +24,25 @@ jobs:

- name: Publish the package
run: nuget push *.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}

- name: Get version
id: package_version
uses: KageKirin/[email protected]
with:
file: VerticalSliceArchitecture.nuspec
xpath: /package/metadata/version

- name: Create git tag
run: |
git tag -m "CI: create new tag" ${{ steps.package_version.outputs.version }}
git push https://${{ github.token }}@github.com/Hona/VerticalSliceArchitecture
- name: Create release
uses: ncipollo/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
prerelease: false
generateReleaseNotes: true
tag: ${{ steps.package_version.outputs.version }}

0 comments on commit b43d7a2

Please sign in to comment.