-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (58 loc) · 2.14 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
name: ci
on: [push, workflow_dispatch]
env:
NODE_OPTIONS: --max-old-space-size=5000
CC_TEST_REPORTER_ID: 7997607c5b558cb4d41dc064f3df1a81c07f2de9861ed73c738c23ed8dbab69e
jobs:
build-job:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message , 'skip ci')"
steps:
- { uses: actions/checkout@v4, with: { persist-credentials: false } }
- { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }
- run: yarn --frozen-lockfile
- run: yarn dev-lib tsc
- name: test
run: |
curl -s -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter
./cc-test-reporter before-build
yarn test
./cc-test-reporter after-build -t lcov
release-job:
runs-on: ubuntu-latest
if: github.ref_name == 'master'
permissions:
contents: write
id-token: write
steps:
- { uses: actions/checkout@v4, with: { persist-credentials: true } }
- { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }
# Cache for npm/npx in ~/.npm
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-v1-${{ runner.os }}
- run: yarn --frozen-lockfile
- run: yarn build
- name: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx @naturalcycles/semantic-release
docs-job:
runs-on: ubuntu-latest
if: github.ref_name == 'master'
steps:
- { uses: actions/checkout@v4, with: { persist-credentials: false } }
- { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }
- run: yarn --frozen-lockfile
- name: docs-build
run: yarn docs-build
- name: publish docs to github pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vitepress/dist
force_orphan: true
commit_message: 'deploy docs [skip ci]'
# publish_branch: gh-pages