Skip to content

Prepare release

Prepare release #24

name: Prepare 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: Update unreleased references in docs
run: |
grep -rlF '<!-- gs:version unreleased -->' doc/src |
xargs perl -p -i -e \
's/<!-- gs:version unreleased -->/<!-- gs:version ${{ steps.latest.outputs.output }} -->/g'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: Release ${{ steps.latest.outputs.output }}
branch: release/${{ steps.latest.outputs.output }}
labels: prepare-release
commit-message: Release ${{ steps.latest.outputs.output }}
token: ${{ secrets.PAT }}
body: ''