Skip to content

Commit 915777b

Browse files
committed
ci: add publish actions
1 parent 5f4e82e commit 915777b

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

.github/workflows/publish-beta.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: publish-beta
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: '16.x'
15+
- name: NPM config
16+
run: |
17+
npm config set //registry-lpm.listenai.com/:_password ${{ secrets.LPM_ZHUOBIN_TOKEN }}
18+
npm config set //registry-lpm.listenai.com/:username zbzhao
19+
npm config set //registry-lpm.listenai.com/:email [email protected]
20+
npm config set //registry-lpm.listenai.com/:always-auth true
21+
- run: npm install
22+
- run: npm run prepack
23+
# - run: npm publish --tag=beta --registry=https://registry-lpm.listenai.com
24+
- uses: JS-DevTools/npm-publish@v1
25+
with:
26+
token: ${{ secrets.NPM_TOKEN }}
27+
tag: 'beta'

.github/workflows/publish-latest.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: publish-latest
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: '16.x'
15+
- name: NPM config
16+
run: |
17+
npm config set //registry-lpm.listenai.com/:_password ${{ secrets.LPM_ZHUOBIN_TOKEN }}
18+
npm config set //registry-lpm.listenai.com/:username zbzhao
19+
npm config set //registry-lpm.listenai.com/:email [email protected]
20+
npm config set //registry-lpm.listenai.com/:always-auth true
21+
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
22+
- uses: battila7/get-version-action@v2
23+
id: get_version
24+
- run: npm dist-tag add @listenai/uiohook-napi@${{ steps.get_version.outputs.version-without-v }} latest
25+
- run: npm dist-tag add @listenai/uiohook-napi@${{ steps.get_version.outputs.version-without-v }} latest --registry=https://registry-lpm.listenai.com
26+
27+
28+

0 commit comments

Comments
 (0)