Create release PR #3
Workflow file for this run
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
name: Create release PR | |
on: | |
workflow_dispatch: | |
jobs: | |
create-release-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-python-env | |
- name: Batch changes | |
uses: miniscruff/changie-action@v2 | |
with: | |
version: latest | |
args: batch auto | |
- name: Merge | |
uses: miniscruff/changie-action@v2 | |
with: | |
version: latest | |
args: merge | |
- name: Get the latest version | |
id: changie-latest | |
uses: miniscruff/changie-action@v2 | |
with: | |
version: latest | |
args: latest | |
- name: Set latest package version | |
id: package-version | |
run: | | |
VERSION="${{ steps.changie-latest.outputs.output }}" | |
VERSION_NO_V=$(echo "$VERSION" | cut -c 2-) | |
hatch version "$VERSION_NO_V" | |
MESSAGE=$(cat ".changes/$VERSION.md") | |
echo "::set-output name=version::$VERSION_NO_V" | |
echo "::set-output name=message::$MESSAGE" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
title: "version: ${{ steps.latest.outputs.output }}" | |
branch: release/${{ steps.package-version.outputs.version }} | |
commit-message: | | |
"version: ${{ steps.package-version.outputs.version }}" | |
${{ steps.package-version.outputs.message }} |