Skip to content

update workflow

update workflow #22

Workflow file for this run

name: Release

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

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 38, Col: 7): Unexpected value 'echo "OIDC 令牌是否存在'
on:
push:
branches:
- main # 发布的目标分支
permissions:
id-token: write
contents: read
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18' # 你项目使用的 Node.js 版本
registry-url: 'https://registry.npmjs.org/'
always-auth: true
- name: Install Yarn
run: npm install -g yarn
- name: Install
run: yarn
- name: Build project
run: yarn 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: yarn version
publish: yarn release
commit: '[ci] release'
title: '[ci] release'
env:
# Needs access to push to main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}