chore: publish github

This commit is contained in:
xiaojunnuo
2026-01-16 12:57:14 +08:00
parent 8546e326cf
commit 0224faa184
7 changed files with 128 additions and 44 deletions

39
.github/workflows/publish-github.yaml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: publish-github
on:
push:
branches: ['v2-dev']
paths:
- "trigger/publish.trigger"
workflow_run:
workflows: [ "build-image-for-release" ]
types:
- completed
# schedule:
# - # 国际时间 19:17 执行北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间
# - cron: '17 19 * * *'
permissions:
contents: read
packages: write
jobs:
publish-github:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: publish_to_github
id: publish_to_github
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
rm -rf ./pnpm*.yaml
npm install -g pnpm
pnpm install
npm run publish_to_github
working-directory: ./