-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (59 loc) · 2.18 KB
/
ci.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches:
- main
pull_request:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
env:
RELEASE: ${{ github.event.release.name }}
RELEASE_ZIP: zoo-diff-viewer-extension_${{ github.event.release.name || github.sha }}.zip
steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn install
- uses: Swatinem/rust-cache@v2
with:
workspaces: './src/wasm-lib'
- run: yarn build:wasm:dev
- run: yarn build
- run: yarn test
- name: Run playwright e2e tests
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
KITTYCAD_TOKEN: ${{ secrets.KITTYCAD_TOKEN }}
run: |
yarn playwright install chromium --with-deps
yarn playwright test --retries 1
- name: Create release zip
run: |
cd build
zip -r ../$RELEASE_ZIP *
cd ..
unzip -l $RELEASE_ZIP
- uses: actions/upload-artifact@v4
with:
path: ${{ env.RELEASE_ZIP }}
name: ${{ env.RELEASE_ZIP }}
- name: Upload zip to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
file: ${{ env.RELEASE_ZIP }}
- name: Upload zip to Chrome Web Store
if: github.event_name == 'release'
uses: mobilefirstllc/cws-publish@latest
with:
action: publish
client_id: ${{ secrets.CHROME_WEBSTORE_CLIENT_ID }}
client_secret: ${{ secrets.CHROME_WEBSTORE_CLIENT_SECRET }}
refresh_token: ${{ secrets.CHROME_WEBSTORE_REFRESH_TOKEN }}
extension_id: gccpihmphokfjpohkmkbimnhhnlpmegp
zip_file: ${{ env.RELEASE_ZIP }}