fix: release artifacts

This commit is contained in:
kunish 2023-08-27 23:51:13 +08:00
parent 0a783a3d91
commit 3bab638f50
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -23,6 +23,35 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
release-type: node 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: release:
needs: release-please needs: release-please
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -47,11 +76,5 @@ jobs:
- name: attach release artifacts - name: attach release artifacts
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
files: dist/* files: dist/**
tag_name: ${{ needs.release-please.outputs.tag_name }} 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