-
Notifications
You must be signed in to change notification settings - Fork 57
52 lines (44 loc) · 1.29 KB
/
update-benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Weekly update
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
auto-update:
name: Automated benchmarks update
runs-on: Ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- uses: actions/cache@v4
id: yarn-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
- run: yarn install --prefers-offline
if: ${{ steps.yarn-cache.outputs.cache-hit == 'true' }}
- name: Bump patch
run: npm version patch --no-git-tag-version
- name: Update
id: update
run: yarn run update-benchmarks
- name: Build final result
run: yarn build
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
- name: Push Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automated weekly update of the benchmark.
skip_dirty_check: true
skip_fetch: true