Skip to content

Commit 4a728e8

Browse files
committed
Add release prep github action
1 parent aa0428f commit 4a728e8

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/release_prep.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Release Prep"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version number for the next release."
8+
required: true
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
with:
18+
clean: true
19+
fetch-depth: 0
20+
21+
- name: "generate changelog"
22+
run: |
23+
gh extension install chelnak/gh-changelog
24+
gh changelog new --next-version ${{ github.event.inputs.version }}
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: "commit changes"
29+
run: |
30+
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
31+
git config --local user.name "GitHub Actions"
32+
git add .
33+
git commit -m "Release prep v${{ github.event.inputs.version }}"
34+
35+
- name: Create Pull Request
36+
uses: peter-evans/create-pull-request@v7
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
commit-message: "Release prep v${{ github.event.inputs.version }}"
40+
branch: "release-prep"
41+
delete-branch: true
42+
title: "Release prep v${{ github.event.inputs.version }}"
43+
base: "main"
44+
body: |
45+
Automated release-prep from commit ${{ github.sha }}.
46+
labels: "maintenance"

0 commit comments

Comments
 (0)