Skip to content

Commit

Permalink
.github/workflows: use softprops/action-gh-release in release workflow
Browse files Browse the repository at this point in the history
actions/create-release is no longer maintained. Also, uploading release
artifacts using skx/github-action-publish-binaries is a bit of a lottery
and sometimes repeatedly fails.

Switch to softprops/action-gh-release instead, which combines creating a
release with uploading release artifacts and allows to trigger the
release notes auto-generation.

Also, the action seems maintained and is suggested as a replacement for
actions/create-release, see
https://github.com/actions/upload-release-asset#github-action---releases-api

Signed-off-by: Tobias Klauser <[email protected]>
  • Loading branch information
tklauser committed Mar 3, 2023
1 parent 378e2d3 commit 34db9d1
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,13 @@ jobs:
run: make release

- name: Create Release
id: create_release
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true # turn this to false once release notes are automatically added
name: Release ${{ github.ref }}
draft: true
prerelease: false
body: |
Note for maintainers:: Please update the description with the actual release notes (see RELEASE.md for instructions).
- name: Upload the artifacts
id: upload-release-artifacts
uses: skx/github-action-publish-binaries@b9ca5643b2f1d7371a6cba7f35333f1461bbc703
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ steps.create_release.outputs.id }}
args: 'release/*'
generate_release_notes: true
files: 'release/*'

0 comments on commit 34db9d1

Please sign in to comment.