Skip to content

Commit 4c3ba35

Browse files
committed
chore: Add autopublish for beta versions
1 parent 5d45539 commit 4c3ba35

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/publish-beta.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Beta
2+
on:
3+
push:
4+
branches:
5+
- beta
6+
jobs:
7+
npm-publish:
8+
name: npm-publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v2
13+
- id: check
14+
uses: EndBug/version-check@v1
15+
with:
16+
diff-search: true
17+
- name: Set up Node
18+
if: steps.check.outputs.changed == 'true' && contains(steps.checks.outputs.version, 'beta')
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: "14"
22+
- name: Install
23+
if: steps.check.outputs.changed == 'true' && contains(steps.checks.outputs.version, 'beta')
24+
run: npm ci
25+
- name: Setup publish token
26+
if: steps.check.outputs.changed == 'true' && contains(steps.checks.outputs.version, 'beta')
27+
run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc
28+
env:
29+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
30+
- name: Publish
31+
if: steps.check.outputs.changed == 'true' && contains(steps.checks.outputs.version, 'beta')
32+
run: npm publish --tag beta

0 commit comments

Comments
 (0)