Skip to content

Merge branch 'main' of https://github.com/moohng/unoapi #62

Merge branch 'main' of https://github.com/moohng/unoapi

Merge branch 'main' of https://github.com/moohng/unoapi #62

Workflow file for this run

name: 发布包 & 创建版本
on:
push:
branches:
- main
workflow_dispatch: # 手动触发也可以
permissions:
contents: write
id-token: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
steps:
# 1️⃣ 拉取代码
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
# 3️⃣ 设置 pnpm & 安装依赖
- name: Setup pnpm
uses: pnpm/action-setup@v4
# 2️⃣ 设置 Node 环境
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 20
cache: pnpm
# 4️⃣ 安装
- name: Build packages
run:
pnpm install
# 5️⃣ 创建新版本 & 发布 & 生成 release
- name: Create and publish new versions
uses: changesets/action@v1
with:
version: pnpm changeset version
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}