-
-
Notifications
You must be signed in to change notification settings - Fork 718
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate GitHub Releases when new tags are pushed (#8626)
- Loading branch information
1 parent
af237f0
commit d8dc8ad
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# These will be overridden by the publish workflow and set to the new tag | ||
name-template: 'Next Release' | ||
tag-template: 'next' | ||
|
||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
|
||
template: | | ||
## Changes | ||
$CHANGES | ||
See the [Changelog](https://docs.dask.org/en/stable/changelog.html) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update_release_draft: | ||
if: github.repository == 'dask/distributed' | ||
permissions: | ||
# Write permission is required to create a GitHub release | ||
contents: write | ||
pull-requests: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Required to get tag history | ||
- name: Check if release commit | ||
id: check_release_commit | ||
run: git describe --exact-match --tags $(git rev-parse HEAD) | ||
continue-on-error: true | ||
- uses: release-drafter/release-drafter@v6 | ||
if: steps.check_release_commit.outcome != 'success' | ||
with: | ||
disable-autolabeler: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release Publisher | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*.*.*" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
publish_release: | ||
if: github.repository == 'dask/distributed' | ||
permissions: | ||
# Write permission is required to publish a GitHub release | ||
contents: write | ||
pull-requests: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set version env | ||
# Use a little bit of bash to extract the tag name from the GitHub ref | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- uses: release-drafter/release-drafter@v5 | ||
with: | ||
disable-autolabeler: true | ||
# Override the Release name/tag/version with the actual tag name | ||
name: ${{ env.RELEASE_VERSION }} | ||
tag: ${{ env.RELEASE_VERSION }} | ||
version: ${{ env.RELEASE_VERSION }} | ||
# Publish the Release | ||
publish: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |