Skip to content

Commit f1a3570

Browse files
authored
upload benchmarks_generated.js for releases as part of the release workflow (#911)
1 parent cf5a50f commit f1a3570

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
run: |
5151
npm run build-prod-min
5252
npm run build-css
53+
npm run build-benchmarks
5354
5455
- name: Create Archive
5556
run: |
@@ -110,6 +111,19 @@ jobs:
110111
asset_name: dist.zip
111112
asset_content_type: application/zip
112113

114+
- name: Copy benchmarks_generated.js
115+
run: |
116+
mkdir tmp
117+
cp bench/versions/benchmarks_generated.js tmp
118+
cp bench/versions/benchmarks_generated.js.map tmp
119+
120+
- name: Upload Benchmarks to GitHub Pages
121+
uses: peaceiris/actions-gh-pages@v3
122+
with:
123+
github_token: ${{ secrets.GITHUB_TOKEN }}
124+
publish_dir: tmp
125+
destination_dir: benchmarks/${{ steps.prepare_release.outputs.version_tag }}
126+
113127
- name: Clean up
114128
if: ${{ steps.prepare_release.outputs.release_type == 'regular' }}
115129
run: |

.github/workflows/upload-benchmarks.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
tags:
8-
- v*
97

108
jobs:
119
upload_benchmarks:
@@ -38,15 +36,3 @@ jobs:
3836
github_token: ${{ secrets.GITHUB_TOKEN }}
3937
publish_dir: tmp
4038
destination_dir: benchmarks/main
41-
42-
- name: Get tag
43-
if: startsWith(github.ref, 'refs/tags/v')
44-
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
45-
46-
- name: Upload to GitHub Pages (tag)
47-
if: startsWith(github.ref, 'refs/tags/v')
48-
uses: peaceiris/actions-gh-pages@v3
49-
with:
50-
github_token: ${{ secrets.GITHUB_TOKEN }}
51-
publish_dir: tmp
52-
destination_dir: benchmarks/${{ env.TAG }}

0 commit comments

Comments
 (0)