mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-12-06 22:36:06 +08:00
21 lines
543 B
YAML
21 lines
543 B
YAML
name: npm publish
|
|
on:
|
|
release:
|
|
types: [created]
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
id-token: write # OIDC 必須
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24' # trusted publishing 需要 >= 22.14
|
|
- run: npm install -g npm@latest
|
|
- run: npm install
|
|
- name: Publish
|
|
run: |
|
|
echo "repo=$GITHUB_REPOSITORY"
|
|
npm publish --access public |