Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/create_github_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: github/release
run-name: "[${{ github.ref_name }}] github/release"


on:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
push:
tags:
- '*'

# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#defining-access-for-the-github_token-scopes
permissions: {}


jobs:
create-release:
permissions:
contents: write
steps:
- id: checkout_source
name: Checkout Source
# https://github.com/actions/checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- id: create_release
name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash --noprofile --norc -euxo pipefail {0}
run: |
# create GitHub release
# https://cli.github.com/manual/gh_release_create
args=(
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--title 'Release ${{ github.ref_name }}'
--generate-notes
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will automatically generate basic release notes based on the PRs merged since the previous release.

xref: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

)
url=$(gh release create "${args[@]}")
echo "::notice::${url}"