Skip to content

Commit

Permalink
upload benchmarks_generated.js for releases as part of the release wo…
Browse files Browse the repository at this point in the history
…rkflow (#911)
  • Loading branch information
xabbu42 committed Jan 28, 2022
1 parent cf5a50f commit f1a3570
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
run: |
npm run build-prod-min
npm run build-css
npm run build-benchmarks
- name: Create Archive
run: |
Expand Down Expand Up @@ -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: |
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/upload-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- main
tags:
- v*

jobs:
upload_benchmarks:
Expand Down Expand Up @@ -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 }}

0 comments on commit f1a3570

Please sign in to comment.