From 6b078a573107bf341bd177bef3b345991c6b0c1d Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 9 Jan 2025 00:57:48 +0800 Subject: [PATCH] cd: build dashboard files automatically --- .github/workflows/auto_release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto_release.yml b/.github/workflows/auto_release.yml index 4e53bf74b..4c6c3161e 100644 --- a/.github/workflows/auto_release.yml +++ b/.github/workflows/auto_release.yml @@ -2,6 +2,7 @@ on: push: tags: - 'v*' + workflow_dispatch: name: Auto Release @@ -14,6 +15,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Dashboard Build + run: | + cd dashboard + npm install + npm run build + echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV + echo ${{ github.ref_name }} > dist/assets/version + zip -r dist.zip dist + - name: Fetch Changelog run: | echo "changelog=changelogs/${{github.ref_name}}.md" >> "$GITHUB_ENV" @@ -21,4 +31,5 @@ jobs: - name: Create Release uses: ncipollo/release-action@v1 with: - bodyFile: ${{ env.changelog }} \ No newline at end of file + bodyFile: ${{ env.changelog }} + artifacts: "dashboard/dist.zip" \ No newline at end of file