diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 803e2b0aa03..bc2ad4bd247 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,6 +50,7 @@ jobs: run: | npm run build-prod-min npm run build-css + npm run build-benchmarks - name: Create Archive run: | @@ -110,6 +111,19 @@ jobs: asset_name: dist.zip asset_content_type: application/zip + - name: Copy benchmarks_generated.js + run: | + mkdir tmp + cp bench/versions/benchmarks_generated.js tmp + cp bench/versions/benchmarks_generated.js.map tmp + + - name: Upload Benchmarks to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: tmp + destination_dir: benchmarks/${{ steps.prepare_release.outputs.version_tag }} + - name: Clean up if: ${{ steps.prepare_release.outputs.release_type == 'regular' }} run: | diff --git a/.github/workflows/upload-benchmarks.yml b/.github/workflows/upload-benchmarks.yml index fa202ccb0ea..e8e34876964 100644 --- a/.github/workflows/upload-benchmarks.yml +++ b/.github/workflows/upload-benchmarks.yml @@ -4,8 +4,6 @@ on: push: branches: - main - tags: - - v* jobs: upload_benchmarks: @@ -38,15 +36,3 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: tmp destination_dir: benchmarks/main - - - name: Get tag - if: startsWith(github.ref, 'refs/tags/v') - run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - - name: Upload to GitHub Pages (tag) - if: startsWith(github.ref, 'refs/tags/v') - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: tmp - destination_dir: benchmarks/${{ env.TAG }}