Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate GitHub Releases when new tags are pushed #8626

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/release-drafter.yml
@@ -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.
24 changes: 24 additions & 0 deletions .github/workflows/release-drafter.yml
@@ -0,0 +1,24 @@
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: release-drafter/release-drafter@v5
with:
disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/release-publish.yml
@@ -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 }}