8
8
- beta
9
9
- main
10
10
11
+ concurrency :
12
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13
+ cancel-in-progress : true
14
+
15
+ permissions :
16
+ contents : read # for checkout
17
+
11
18
jobs :
19
+ build :
20
+ runs-on : ubuntu-latest
21
+ name : Lint & Build
22
+ steps :
23
+ - uses : actions/checkout@v3
24
+ - uses : actions/setup-node@v3
25
+ with :
26
+ node-version : lts/*
27
+ - run : corepack enable && pnpm --version
28
+ - run : pnpm install
29
+ - run : pnpm type-check
30
+ - run : pnpm lint
31
+ - run : pnpm build
32
+
12
33
test :
13
34
runs-on : ${{ matrix.platform }}
14
35
name : Node.js ${{ matrix.node-version }} / ${{ matrix.platform }}
15
36
strategy :
16
37
fail-fast : false
17
38
matrix :
18
- platform : [ubuntu-latest]
19
- node-version : [lts/*, current ]
39
+ platform : [macos-latest, ubuntu-latest, windows -latest]
40
+ node-version : [lts/*]
20
41
include :
21
- - platform : macos -latest
22
- node-version : lts/*
42
+ - platform : ubuntu -latest
43
+ node-version : current
23
44
steps :
24
45
- uses : actions/checkout@v3
25
46
- uses : actions/setup-node@v3
@@ -28,11 +49,15 @@ jobs:
28
49
- run : corepack enable && pnpm --version
29
50
- run : pnpm install
30
51
- run : pnpm test
31
- - run : pnpm lint
32
52
33
53
release :
54
+ permissions :
55
+ contents : write # to be able to publish a GitHub release
56
+ issues : write # to be able to comment on released issues
57
+ pull-requests : write # to be able to comment on released pull requests
58
+ id-token : write # to enable use of OIDC for npm provenance
34
59
name : ' Semantic release'
35
- needs : test
60
+ needs : [build, test]
36
61
runs-on : ubuntu-latest
37
62
steps :
38
63
- uses : actions/checkout@v3
53
78
# Build docs
54
79
- run : npm run docs:build
55
80
# Deploy docs
81
+ - uses : tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1
82
+ id : generate-token
83
+ with :
84
+ app_id : ${{ secrets.ECOSCRIPT_APP_ID }}
85
+ private_key : ${{ secrets.ECOSCRIPT_APP_PRIVATE_KEY }}
56
86
- uses : peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
57
87
if : ${{ github.ref == 'refs/heads/main' }}
58
88
with :
59
- github_token : ${{ secrets.GITHUB_TOKEN }}
89
+ github_token : ${{ steps.generate-token.outputs.token }}
60
90
publish_dir : ./docs
0 commit comments