File tree Expand file tree Collapse file tree 2 files changed +41
-16
lines changed Expand file tree Collapse file tree 2 files changed +41
-16
lines changed Original file line number Diff line number Diff line change
1
+ name : Create Release PR
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - release
7
+ - ' *-releasebranch'
8
+
9
+ jobs :
10
+ release :
11
+ name : Create Release PR
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout Repo
15
+ uses : actions/checkout@master
16
+ with :
17
+ # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
18
+ fetch-depth : 0
19
+
20
+ - name : Setup Node.js 14.x
21
+ uses : actions/setup-node@master
22
+ with :
23
+ node-version : 14.x
24
+
25
+ - name : Install Dependencies
26
+ run : yarn
27
+
28
+ # Ensures a new @firebase/app is published with every release.
29
+ # This keeps the SDK_VERSION variable up to date.
30
+ - name : Add a changeset for @firebase/app
31
+ # pull master so changeset can diff against it
32
+ run : |
33
+ git pull -f --no-rebase origin master:master
34
+ yarn ts-node-script scripts/ci/add_changeset.ts
35
+
36
+ - name : Create Release Pull Request
37
+ uses : changesets/action@v1
38
+ env :
39
+ GITHUB_TOKEN : ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -30,10 +30,11 @@ jobs:
30
30
with :
31
31
github-token : ${{ secrets.GITHUB_TOKEN }}
32
32
script : |
33
+ let branch = context.ref.replace("refs/heads/", "")
33
34
await github.rest.repos.merge({
34
35
owner: context.repo.owner,
35
36
repo: context.repo.repo,
36
- base: 'release' ,
37
+ base: branch ,
37
38
head: 'master'
38
39
})
39
40
- name : Checkout release branch (with history)
44
45
ref : release
45
46
- name : Yarn install
46
47
run : yarn
47
- # Ensures a new @firebase/app is published with every release.
48
- # This keeps the SDK_VERSION variable up to date.
49
- - name : Add a changeset for @firebase/app
50
- # pull master so changeset can diff against it
51
- run : |
52
- git pull -f --no-rebase origin master:master
53
- yarn ts-node-script scripts/ci/add_changeset.ts
54
- - name : Create Release Pull Request
55
- uses : changesets/action@v1
56
- env :
57
- GITHUB_TOKEN : ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
58
- - name : Go back to release branch
59
- # changesets/action created and checked out a new branch
60
- # return to `release` branch.
61
- run : git checkout release
62
48
- name : Publish to NPM
63
49
# --skipTests No need to run tests
64
50
# --skipReinstall Yarn install has already been run
You can’t perform that action at this time.
0 commit comments