Skip to content

Commit 484c671

Browse files
authored
Create post release plugin workflow (#5356)
Per [b/301961341](https://b.corp.google.com/issues/301961341), This creates a workflow that can be invoked to automatically create a mergeback branch *and* run the `postReleaseCleanup` task for after a release. The workflow is ran from the release branch, but the PR is created for `master`. I will update the release manual to reflect this as well after it's merged and I've tested it. The `name` input is purely used for naming the mergeback branch PR and such.
1 parent 55cb569 commit 484c671

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Post release cleanup
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
name:
7+
description: 'Release name'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
create-pull-request:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3.5.3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Run post release cleanup task
20+
run: |
21+
./gradlew postReleaseCleanup
22+
23+
- name: Create Pull Request
24+
uses: peter-evans/create-pull-request@v4
25+
with:
26+
base: 'master'
27+
branch: 'releases/${{ inputs.name }}.mergeback'
28+
add-paths: |
29+
**/CHANGELOG.md
30+
**/gradle.properties
31+
**/*.gradle
32+
**/*.gradle.kts
33+
title: '${{ inputs.name}} mergeback'
34+
body: 'Auto-generated PR for cleaning up release ${{ inputs.name}}'
35+
commit-message: 'Post release cleanup for ${{ inputs.name }}'

0 commit comments

Comments
 (0)