-
Notifications
You must be signed in to change notification settings - Fork 17
50 lines (38 loc) · 1.19 KB
/
publish.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
name: Publish
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '21.2.0'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Check types
run: tsc --noEmit --pretty --project './tsconfig.json'
- name: Build library
run: yarn build-lib
- name: Run tests
run: yarn test --ci --coverage
- uses: actions/setup-node@v2
with:
registry-url: 'https://npm.pkg.github.com'
- name: Publish and tag
run: |
# We need npm 7.7.0 or higher; see https://github.com/npm/cli/issues/2834
npm install -g npm@latest
# Create the changelog, update the version and publish using the config from .releaserc
npx semantic-release
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: phorkish
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: phorkish
GIT_COMMITTER_EMAIL: [email protected]