-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (46 loc) · 1.44 KB
/
create-release-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 }}