-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (49 loc) · 1.8 KB
/
create-release-pr.yml
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
name: Create PR for Release
on:
workflow_call:
inputs:
mainBranch:
description: 'Name of main branch'
required: false
type: string
default: 'main'
jobs:
create-release-pr:
name: Create PR
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.RELEASER_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
- name: Create release branch
run: git checkout -b release/${{ github.event.inputs.versionName }}
- name: Update version file
id: make-commit
run: |
echo ${{ github.event.inputs.versionName }} > VERSION
echo -n $(tr -d '\n' < VERSION) > VERSION
git add VERSION
git commit -S --message "Prepare release ${{ github.event.inputs.versionName }}"
echo "commit=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Push release branch
run: git push origin release/${{ github.event.inputs.versionName }}
- name: Create pull request into main
uses: thomaseizinger/[email protected]
with:
github_token: ${{ secrets.GH_RELEASE_TOKEN }}
head: release/${{ github.event.inputs.versionName }}
base: ${{ inputs.mainBranch }}
title: Release ${{ github.event.inputs.versionName }}
reviewers: ${{ github.event.issue.user.login }}
body: |
Release PR for ${{ github.event.inputs.versionName }}
I've updated the version name and committed: ${{ steps.make-commit.outputs.commit }}.