Skip to content

revise

revise #30

Workflow file for this run

name: Release
on:
push:
branches:
- main # 发布的目标分支
permissions:
id-token: write
contents: read
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Install Yarn
run: npm install -g yarn
- run: npm install -g npm@latest
-name: Install
run: npm install

Check failure on line 36 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 36
- name: Build project
run: npm run build # 假设你的项目有一个构建步骤
- name: Debug OIDC Token (Trusted Publisher)
run: |
echo "OIDC 令牌是否存在: ${{ runner.oidc.token != '' }}"
- name: Publish
id: changesets
uses: changesets/action@v1
with:
# Note: pnpm install after versioning is necessary to refresh lockfile
version: npm run version
publish: npm run release
commit: '[ci] release'
title: '[ci] release'
env:
# Needs access to push to main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}