File tree 1 file changed +29
-12
lines changed
1 file changed +29
-12
lines changed Original file line number Diff line number Diff line change 5
5
types : [created]
6
6
7
7
jobs :
8
- build :
8
+ test :
9
9
runs-on : ubuntu-latest
10
10
steps :
11
11
- uses : actions/checkout@v4
12
+ - uses : pnpm/action-setup@v2
13
+ with :
14
+ version : 9
12
15
- uses : actions/setup-node@v4
13
16
with :
14
- node-version : 20
15
- - run : npm install -g pnpm
16
- - run : pnpm test
17
-
17
+ node-version : " 20"
18
+ cache : " pnpm"
19
+ - run : pnpm install
20
+ - run : |
21
+ npx puppeteer browsers install chrome
22
+ - name : Run test
23
+ run : |
24
+ for i in {1..3}; do
25
+ echo "Attempt $i"
26
+ if pnpm test:google; then
27
+ echo "Success on attempt $i"
28
+ exit 0
29
+ fi
30
+ echo "Attempt $i failed, retrying..."
31
+ done
32
+ echo "All attempts failed"
33
+ exit 1
18
34
publish :
19
- needs : build
35
+ needs : test
20
36
runs-on : ubuntu-latest
21
- permissions :
22
- packages : write
23
- contents : read
24
37
steps :
25
38
- uses : actions/checkout@v4
39
+ - uses : pnpm/action-setup@v2
40
+ with :
41
+ version : 9
26
42
- uses : actions/setup-node@v4
27
43
with :
28
- node-version : 20
29
- registry-url : https://npm.pkg.github.com/
30
- - run : npm install -g pnpm
44
+ node-version : " 20"
45
+ cache : " pnpm"
46
+ - run : pnpm install
47
+ - run : pnpm build
31
48
- run : pnpm publish
32
49
env :
33
50
NODE_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments