fix(cd): 简化cd配置
这个提交包含在:
@@ -6,11 +6,43 @@ on:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
cd:
|
||||
uses: https://github.com/halo-sigs/reusable-workflows/.github/workflows/theme-cd.yaml@v3
|
||||
permissions:
|
||||
contents: write
|
||||
package:
|
||||
name: Package Theme
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'release'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
skip-appstore-release: true
|
||||
node-version: 22
|
||||
pnpm-version: 10
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v3
|
||||
with:
|
||||
version: 10
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: theme-package
|
||||
path: dist
|
||||
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: package
|
||||
if: github.event_name == 'release'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: theme-package
|
||||
path: dist
|
||||
- name: Upload Release Assets
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh release upload ${{ github.event.release.tag_name }} dist/*
|
||||
在新议题中引用
屏蔽一个用户