Skip to content

Commit

Permalink
feat: Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nuintun committed Dec 23, 2024
1 parent 891a654 commit 83f388b
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
name: Release to NPM

name: Publish To NPM
on:
# 手动触发
workflow_dispatch:
# Manually trigger.

jobs:
release:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout 🛎️
# 检出代码
- name: Checkout code
uses: actions/checkout@v4

- name: Use pnpm latest 🛠️
# 设置 pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Use Node LTS ✨
# 设置 node
- name: Setup node
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*
registry-url: https://registry.npmjs.org

- name: Install dependencies 📦️
# 安装依赖
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Publish package 🚀
# 发布到 NPM
- name: Publish to NPM
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 83f388b

Please sign in to comment.