Skip to content

Commit 8626348

Browse files
chore: action to automate release prep
1 parent d17f87d commit 8626348

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/release-prep.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Prepare for maven central release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
targetRelease:
6+
description: 'Release number to upgrade to. For example X.X.X'
7+
required: true
8+
previousRelease:
9+
description: 'Current latest maven release'
10+
required: false
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Find and Replace ${{ github.event.inputs.previousRelease }} with ${{ github.event.inputs.targetRelease }}
18+
uses: jacobtomlinson/gha-find-replace@v2
19+
with:
20+
find: ${{ github.event.inputs.previousRelease }}
21+
replace: ${{ github.event.inputs.targetRelease }}
22+
regex: false
23+
- name: Create Release Pull Request
24+
uses: peter-evans/create-pull-request@v3
25+
with:
26+
commit-message: 'chore: prep release ' + ${{ github.event.inputs.targetRelease }}
27+
token: ${{ secrets.RELEASE }}
28+
committer: Release bot <[email protected]>
29+
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
30+
signoff: false
31+
branch: prep-release-${{ github.event.inputs.targetRelease }}
32+
delete-branch: true
33+
title: 'chore: Prep release ' + ${{ github.event.inputs.targetRelease }}
34+
body: |
35+
- Auto-generated release prep pull request for version ${{ github.event.inputs.targetRelease }}

0 commit comments

Comments
 (0)