-
Notifications
You must be signed in to change notification settings - Fork 15
68 lines (60 loc) · 1.81 KB
/
test_and_release.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: Tests
on:
push:
branches:
- master
pull_request:
branches:
- '**'
jobs:
tests:
name: tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [18]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: ${{matrix.node}}
- run: yarn install
- run: yarn build
- name: Lint
run: yarn lint
- name: Check Types
run: yarn run check-types
- name: Unit tests
run: yarn test:unit
- name: E2e tests
run: yarn test:e2e
maybe-release:
name: release
runs-on: ubuntu-latest
needs: tests
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
release-type: node
monorepo-tags: true
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]'
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.releases_created }}
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.releases_created }}
- run: yarn install
if: ${{ steps.release.outputs.releases_created }}
- run: yarn build
if: ${{ steps.release.outputs.releases_created }}
- run: yarn run publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
if: ${{ steps.release.outputs.releases_created }}