Skip to content

Commit

Permalink
ci: add publish actions
Browse files Browse the repository at this point in the history
  • Loading branch information
seasonyuu committed Sep 12, 2024
1 parent 5f4e82e commit 915777b
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: publish-beta

on:
push:
tags: ['v*']

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: NPM config
run: |
npm config set //registry-lpm.listenai.com/:_password ${{ secrets.LPM_ZHUOBIN_TOKEN }}
npm config set //registry-lpm.listenai.com/:username zbzhao
npm config set //registry-lpm.listenai.com/:email [email protected]
npm config set //registry-lpm.listenai.com/:always-auth true
- run: npm install
- run: npm run prepack
# - run: npm publish --tag=beta --registry=https://registry-lpm.listenai.com
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
tag: 'beta'
28 changes: 28 additions & 0 deletions .github/workflows/publish-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: publish-latest

on:
release:
types: [released]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: NPM config
run: |
npm config set //registry-lpm.listenai.com/:_password ${{ secrets.LPM_ZHUOBIN_TOKEN }}
npm config set //registry-lpm.listenai.com/:username zbzhao
npm config set //registry-lpm.listenai.com/:email [email protected]
npm config set //registry-lpm.listenai.com/:always-auth true
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- uses: battila7/get-version-action@v2
id: get_version
- run: npm dist-tag add @listenai/uiohook-napi@${{ steps.get_version.outputs.version-without-v }} latest
- run: npm dist-tag add @listenai/uiohook-napi@${{ steps.get_version.outputs.version-without-v }} latest --registry=https://registry-lpm.listenai.com



0 comments on commit 915777b

Please sign in to comment.