1
0
mirror of synced 2025-12-12 01:18:00 +08:00

chore: add publish action

This commit is contained in:
redhoodsu
2022-07-05 21:25:15 +08:00
parent 2533a84177
commit e2fc3ac13e

27
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Publish to NPM
on:
workflow_dispatch:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- name: Build eruda
run: npm i && npm run build
- name: Publish package on NPM
working-directory: dist
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}