Create release PR #48
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: | |
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 | |
run: | | |
poetry run -q invoke release.build -- -v ${{ github.event.inputs.version }} | |
- name: Update changelog | |
uses: orhun/git-cliff-action@v2 | |
id: cliff-changelog | |
with: | |
config: cliff.toml | |
args: --tag ${{ github.event.inputs.version }} | |
env: | |
OUTPUT: CHANGELOG.md | |
- name: Get changelog entry | |
uses: orhun/git-cliff-action@v2 | |
id: cliff-entry | |
with: | |
config: cliff.toml | |
args: --unreleased --strip header | |
env: | |
OUTPUT: ENTRY.md | |
- 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.cliff-entry.outputs.content }}" | |
branch: release/${{ github.event.inputs.version }} | |
- uses: rickstaa/action-create-tag@v1 | |
with: | |
tag: v${{ github.event.inputs.version }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} |