-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (58 loc) · 1.79 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
49
50
51
52
53
54
55
56
57
58
59
60
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/[email protected]
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 }}