-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add Prepare a release workflow (#77)
Add a workflow that merges the changelog and posts a PR to the repository. With this and GitHub UI, releases can be done entirely from the browser.
- Loading branch information
Showing
2 changed files
with
52 additions
and
45 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,47 @@ | ||
name: Prepare a release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to release (e.g. v1.2.3) | ||
required: false | ||
default: 'auto' | ||
type: string | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
generate-pr: | ||
runs-on: ubuntu-latest | ||
name: Generate release PR | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Batch changes | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
args: batch ${{ inputs.version }} | ||
|
||
- name: Merge changes | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
args: merge | ||
|
||
- name: Get the latest version | ||
id: latest | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
args: latest | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
title: Release ${{ steps.latest.outputs.output }} | ||
branch: release/${{ steps.latest.outputs.output }} | ||
commit-message: Release ${{ steps.latest.outputs.output }} | ||
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