-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (46 loc) · 1.6 KB
/
release-branch.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
55
name: Create version PR from release branch
on:
push:
branches:
- 'release**'
- 'hotfix**'
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Create version PR from release branch
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Cache turbo build setup
uses: actions/cache@v3
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: yarn
- name: Bump Changeset Version
run: yarn ver
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'ci: bump package version'
commit_options: '--no-verify'
- name: Create Release Pull Requests
env:
GITHUB_TOKEN: ${{ secrets.DEV_GITHUB_TOKEN }}
MAIN_TITLE: 'Release: Merge to publish new version to npm'
MAIN_BODY: 'Please review and merge this Pull Request. **Caution: Merge to main branch will trigger publish to npm.**'
DEV_TITLE: 'Release: Merge back new version to develop'
DEV_BODY: 'Merge new prod release back to develop'
run: |
gh pr create --title "$MAIN_TITLE" --body "$MAIN_BODY" --base main && gh pr create --title "$DEV_TITLE" --body "$DEV_BODY" --base develop