-
Notifications
You must be signed in to change notification settings - Fork 18
61 lines (50 loc) · 1.81 KB
/
sync-main-to-develop.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
56
57
58
59
60
61
name: Sync main to develop after release
on:
pull_request:
types:
- closed
branches:
- main
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: macOS-latest
permissions:
contents: write
pull-requests: write
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: './common/config/rush/pnpm-lock.yaml'
# Install rush
- name: Install rush
run: node common/scripts/install-run-rush.js install --bypass-policy
- name: Get version
id: package-version
uses: xile611/read-package-version-action@main
with:
path: packages/vmind
- name: Create a new branch
run: |
git status
git checkout -b sync/main-${{ steps.package-version.outputs.current_version }}
git push origin sync/main-${{ steps.package-version.outputs.current_version }}
- name: Create Pull Request
uses: dustinirving/create-pr@v1.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: '[Auto Sync] Sync the code from branch main to branch develop after release ${{ steps.package-version.outputs.current_version }}'
base: develop
head: sync/main-${{ steps.package-version.outputs.current_version }}
reviewers: xile611
body: 'Sync the code from branch main to branch develop after release ${{ steps.package-version.outputs.current_version }}'