-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (35 loc) · 1.28 KB
/
Release-2-Merge-develop-to-master.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
name: "Release 2 - Create PR to merge develop into master"
on:
pull_request:
branches:
- develop
types:
- closed
jobs:
create-develop-to-master-pr:
name: "Create PR to merge develop into master"
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.head.ref, 'release/')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract version from merged PR
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- name: Create PR
uses: thomaseizinger/create-pull-request@1.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: develop
base: master
title: Merge develop into master for release ${{ env.RELEASE_VERSION }}
reviewers: ${{ github.actor }} #Assign the PR to the user who merged the release branch
body: |
Hi @${{ github.actor }}!
This PR merges the develop branch into master for the release ${{ env.RELEASE_VERSION }}.
Once this PR is merged, the release will be published.
Happy merging!