-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.42 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
name: ci
on: [push, workflow_dispatch]
env:
NODE_OPTIONS: --max-old-space-size=3200
CC_TEST_REPORTER_ID: 8263f3329c9a25abc9ad21473a65deabd4c8f0cd54db6e7fbba1a85fb6e5b829
jobs:
build-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }
- run: yarn --frozen-lockfile --prefer-offline
- run: yarn build
- 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 --prefer-offline
- run: yarn build-prod
- name: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx @naturalcycles/semantic-release