From 3bab638f502efb6aedd1372feed829d95c3fd806 Mon Sep 17 00:00:00 2001 From: kunish Date: Sun, 27 Aug 2023 23:51:13 +0800 Subject: [PATCH] fix: release artifacts --- .github/workflows/release.yml | 37 ++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e31e906..dd42d05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,35 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} release-type: node + gh-pages: + needs: release-please + runs-on: ubuntu-latest + if: ${{ needs.release-please.outputs.release_created }} + steps: + - uses: actions/checkout@v3 + + - uses: pnpm/action-setup@v2 + with: + version: latest + + - uses: actions/setup-node@v3 + with: + cache: pnpm + node-version: latest + + - name: build + env: + PUBLIC_PATH: '/metacubexd' + run: | + pnpm install + pnpm build + + - name: Publish Github Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist + release: needs: release-please runs-on: ubuntu-latest @@ -47,11 +76,5 @@ jobs: - name: attach release artifacts uses: softprops/action-gh-release@v1 with: - files: dist/* + files: dist/** tag_name: ${{ needs.release-please.outputs.tag_name }} - - - name: Publish Github Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist