-
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.42 KB
/
release_prep.yml
File metadata and controls
50 lines (43 loc) · 1.42 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
name: "Release Prep"
on:
workflow_dispatch:
inputs:
version:
description: "The version number for the next release (e.g. 1.0.2)"
required: true
permissions:
contents: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
clean: true
fetch-depth: 0
- name: "generate changelog"
run: |
gh extension install chelnak/gh-changelog
gh changelog new --next-version v${{ github.event.inputs.version }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "commit changes"
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Release prep v${{ github.event.inputs.version }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Release prep v${{ github.event.inputs.version }}"
branch: "release-prep"
delete-branch: true
title: "Release prep v${{ github.event.inputs.version }}"
base: "main"
body: |
Automated release-prep from commit ${{ github.sha }}.
labels: "maintenance"