Files
hexo-theme-butterfly/.github/workflows/publish.yml
T

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