publish-github-release.yml (584B)
1 name: Publish / GitHub Release 2 3 on: 4 push: 5 tags: 6 - "v*" 7 8 permissions: 9 contents: write 10 11 jobs: 12 github-release: 13 runs-on: ubuntu-latest 14 steps: 15 - uses: actions/checkout@v4 16 with: 17 fetch-depth: 0 18 - name: Create GitHub Release 19 env: 20 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 run: | 22 PREV_TAG=$(git tag --sort=-v:refname | grep '^v' | sed -n '2p') 23 gh release create "$GITHUB_REF_NAME" \ 24 --title "$GITHUB_REF_NAME" \ 25 --generate-notes \ 26 --notes-start-tag "$PREV_TAG"