Release¶
Release handling spans two workflows and one Probot configuration.
reusable-release-drafter.ymlmaintains the draft release with a generated changelog as PRs land.reusable-release-cd-refresh-master.ymlmerges the published release tag intomastersomasteralways tracks the latest release._extends: gh-plumbing:.github/commons-release-drafter.ymlprovides shared release-drafter categorization.
Draft releases¶
Workflow¶
on:
push:
branches:
- develop
jobs:
update_release_draft:
uses: nolte/gh-plumbing/.github/workflows/reusable-release-drafter.yml@develop
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
Probot¶
Categorization
Release-drafter buckets PRs by label. commons-settings declares the shared label palette; boring-cyborg applies the labels to each PR.
Refresh master on release¶
on:
release:
types: [published]
jobs:
refresh_presentation_branch:
uses: nolte/gh-plumbing/.github/workflows/reusable-release-cd-refresh-master.yml@develop
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
Direct commits to master
Don't commit to master directly—the workflow will overwrite your changes on the next release.
Central configuration¶
```yaml name: Release Drafter
on: workflow_call: secrets: token: required: true
jobs: update_release_draft: name: Update Release Draft runs-on: ubuntu-latest steps: - uses: release-drafter/release-drafter@v6 env: GITHUB_TOKEN: ${{ secrets.token }}
```
```yaml name: Release Deliver to Master
on: workflow_call: inputs: from_branch: required: false default: ${{ github.event.ref }} type: string target_branch: required: false default: master type: string secrets: token: required: true
jobs: refresh_presentation_branch: name: "Publish the the Release to Master" runs-on: ubuntu-latest steps: - name: Checkout master uses: actions/checkout@v6.0.0 - name: Merge Tag -> Master uses: devmasx/merge-branch@1.4.0 with: type: now from_branch: ${{ inputs.from_branch }} target_branch: ${{ inputs.target_branch }} github_token: ${{ secrets.token }}
```
```yaml¶
name-template: v$NEXT_PATCH_VERSION tag-template: v$NEXT_PATCH_VERSION branches: - master - develop categories: - title: 🚀 Features label: enhancement - title: 🐛 Bug Fixes label: bug - title: 🧰 Maintenance labels: - "chore" - "documentations" - "project-config" - "cicd" - "dependencies"
template: | ## Changes
$CHANGES
```