forked from DisnakeDev/disnake
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (64 loc) · 2.46 KB
/
create-release-pr.yaml
File metadata and controls
78 lines (64 loc) · 2.46 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# SPDX-License-Identifier: MIT
name: Create Release PR
on:
workflow_dispatch:
inputs:
version:
description: "The new version number, e.g. `1.2.3`."
type: string
required: true
permissions: {}
jobs:
create-release-pr:
name: Create release PR
runs-on: ubuntu-latest
env:
VERSION_INPUT: ${{ inputs.version }}
steps:
# https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
- name: Generate app token
id: generate_token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ steps.generate_token.outputs.token }}
persist-credentials: false
fetch-depth: '0'
- name: Set git name/email
env:
GIT_USER: ${{ vars.GIT_APP_USER_NAME }}
GIT_EMAIL: ${{ vars.GIT_APP_USER_EMAIL }}
run: |
git config user.name "$GIT_USER"
git config user.email "$GIT_EMAIL"
- name: Set up environment
uses: ./.github/actions/setup-env
with:
python-version: '3.10'
- name: Install dependencies
run: uv sync --no-default-groups --group changelog
- name: Build changelog
run: |
uv run towncrier build --yes --version "$VERSION_INPUT"
git commit -a -m "docs: build changelog"
- name: Create pull request
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ steps.generate_token.outputs.token }}
branch: auto/release-v${{ inputs.version }}
delete-branch: true
title: "chore(release): v${{ inputs.version }}"
body: |
Automated release PR, triggered by @${{ github.actor }} for ${{ github.sha }}.
### Tasks
- [ ] Add changelogs from backports, if applicable.
- [ ] Update `|vnext|` in documentation.
- [ ] Once merged, create + push a tag.
<sub>https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}</sub>
labels: |
t: release
assignees: |
${{ github.actor }}