Files
cwd/.github/workflows/npm_publish.yml
anghunk 13f5d51079 ci: 精简 GitHub Actions 工作流名称并删除冗余 LICENSE 文件
- 缩短工作流名称以提升可读性
- 删除文档目录下重复的许可证文件
2026-01-31 11:54:25 +08:00

37 lines
741 B
YAML

name: Publish npm
on:
push:
tags:
- "widget-v*"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
working-directory: docs/widget
run: npm ci
- name: Build widget
working-directory: docs/widget
run: npm run build
- name: Publish to npm
working-directory: docs/widget
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public