-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.26 KB
/
release.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
name: Release
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
trigger-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Branch name
run: echo running on branch ${GITHUB_REF##*/}
- name: Create and checkout release branch
run: |
git config --global user.email "[email protected]"
git config --global user.name "intuit-svc"
git checkout -b release-${GITHUB_REF##*/}
git commit --allow-empty -m "Release ${GITHUB_REF##*/}"
echo "SOURCE_RELEASE_BRANCH=release-${GITHUB_REF##*/}" >> $GITHUB_ENV
git push origin release-${GITHUB_REF##*/}
- name: create-pr
id: open-pr
uses: repo-sync/[email protected]
with:
source_branch: ${{ env.SOURCE_RELEASE_BRANCH }}
destination_branch: "main"
pr_allow_empty: true
pr_title: "Release ${GITHUB_REF##*/}"
pr_label: "release"
github_token: ${{ secrets.GH_TOKEN }}
- name: Merge release PR
uses: sudo-bot/[email protected]
with:
github-token: ${{ secrets.GH_TOKEN }}
number: ${{ steps.open-pr.outputs.pr_number }}