Skip to content

Create release PR

Create release PR #12

name: Create release PR
on:
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
create-pull-request:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.7.1
- name: Install base dependencies
run: poetry install --sync --only base
- name: Bump version and changelog
id: changelog
run: |
poetry run -q invoke release.install release.build -- -v ${{ github.event.inputs.version }} > entry.md
echo; cat entry.md; echo
delimiter="$(openssl rand -hex 8)"
{
echo "body<<${delimiter}"
cat entry.md
echo "${delimiter}"
} >> $GITHUB_OUTPUT
- name: Create pull request
uses: peter-evans/create-pull-request@v5.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "release: v${{ github.event.inputs.version }}"
title: "release: v${{ github.event.inputs.version }}"
body: ${{ steps.changelog.outputs.body }}
branch: release/${{ github.event.inputs.version }}