-
Notifications
You must be signed in to change notification settings - Fork 31
89 lines (81 loc) · 2.12 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: build
on:
push:
branches:
- master
pull_request:
jobs:
build-ubuntu:
uses: ./.github/workflows/build.yml
with:
os: ubuntu-latest
build-macos-x86:
uses: ./.github/workflows/build.yml
with:
os: macos-13
build-macos-arm:
uses: ./.github/workflows/build.yml
with:
os: macos-14
build-windows:
uses: ./.github/workflows/build.yml
with:
os: windows-latest
test:
needs: build-ubuntu
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
browser: [chromium, firefox] # webkit
include:
- os: macos-14
browser: webkit
steps:
- uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: 21.x
- name: Install node dependencies
run: |
npm i -g pnpm
pnpm i
npx playwright install ${{ matrix.browser }}
npx playwright install-deps ${{ matrix.browser }}
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: artifact.tar
- name: Untar files
run: tar -xvf artifact.tar
- name: Test
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
npx playwright test --browser ${{ matrix.browser }} test/
- name: Test device
if: ${{ startsWith(inputs.os, 'macos') }}
run: |
npx playwright test --browser ${{ matrix.browser }} test-device/
release:
needs: test
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: artifact.tar
- name: Untar files
run: tar -xvf artifact.tar
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mv dist my-rime-dist
zip -r my-rime-dist.zip my-rime-dist
gh release upload latest my-rime-dist.zip --clobber