chore: create publish engine.yml

This commit is contained in:
刘菊萍(絮黎) 2023-12-13 17:05:03 +08:00 committed by liujuping
parent d64c7d56df
commit 87a197c11e
1 changed files with 26 additions and 0 deletions

26
.github/workflows/publish engine.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Publish Engine
on:
workflow_dispatch:
jobs:
publish-engine:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- run: npm install && npm run setup
- run: |
npm run build
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- run: npm run pub
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get version
id: get_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"