File tree Expand file tree Collapse file tree 2 files changed +54
-2
lines changed Expand file tree Collapse file tree 2 files changed +54
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
on :
4
4
push :
5
- branches : [main]
5
+ branches : [main, beta ]
6
6
pull_request :
7
- branches : [main]
7
+ branches : [main, beta ]
8
8
9
9
jobs :
10
10
lint :
Original file line number Diff line number Diff line change
1
+ name : Release Beta
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows :
6
+ - CI
7
+ branches :
8
+ - beta
9
+ types :
10
+ - completed
11
+
12
+ jobs :
13
+ release_beta :
14
+ name : Release Beta
15
+ # run only if the CI workflow is successful
16
+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - name : ⬇️ Checkout
20
+ uses :
21
+ actions/checkout@v3
22
+ # make sure to checkout the commit that triggered the CI workflow
23
+ # (which is not necessarily the latest commit)
24
+ with :
25
+ ref : ${{ github.event.workflow_run.head_commit.id }}
26
+
27
+ - name : ⎔ Setup node
28
+ uses : actions/setup-node@v3
29
+ with :
30
+ node-version : " lts/*"
31
+
32
+ - name : 🏗 Install and Build
33
+ run : |
34
+ npm ci
35
+ npm run build
36
+
37
+ - name : 🚀 Create/Update Release Pull Request or Publish to npm
38
+ id : changesets
39
+ uses : changesets/action@v1
40
+ with :
41
+ version : npm run version
42
+ publish : npm run release
43
+ title : " chore(new-beta-release)"
44
+ commit : " chore(new-beta-release)"
45
+ env :
46
+ GITHUB_TOKEN : ${{ secrets.STACKS_TOOLING_GH_RW_PAT }}
47
+ NPM_TOKEN : ${{ secrets.NPM_API_KEY }}
48
+
49
+ # cancel the jobs if another workflow is kicked off for the same branch
50
+ concurrency :
51
+ group : ${{ github.workflow }}-${{ github.ref }}
52
+ cancel-in-progress : true
You can’t perform that action at this time.
0 commit comments