-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.09 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
name: CI
on:
push:
branches:
- main
- dev
workflow_dispatch:
inputs:
force-publish:
type: boolean
required: false
default: false
jobs:
unittests:
name: Run unittests
# if: ${{ !github.event.inputs.force-publish }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: pnpm/action-setup@v2
with:
version: ^8.14.2
run_install: true
- env:
TEST_CLIENT_ID: ${{ secrets.TEST_CLIENT_ID }}
TEST_CLIENT_SECRET: ${{ secrets.TEST_CLIENT_SECRET }}
TEST_REFRESH_TOKEN: ${{ secrets.TEST_REFRESH_TOKEN }}
TEST_EXTENSION_ID: ${{ secrets.TEST_EXTENSION_ID }}
run: pnpm test
publish:
name: Publish action
needs: unittests
if: ${{ github.ref == 'refs/heads/main' && !failure() && !cancelled() && (github.event_name == 'push' || github.event.inputs.force-publish) }}
runs-on: ubuntu-latest
steps:
- uses: wdzeng/action-of-action@v3