-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.29 KB
/
publish-to-npm.yaml
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
name: Publish to npm
on:
push:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.author.email, 'hello@openactive.io')"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
- name: Identify
run: |
git config user.name OpenActive Bot
git config user.email hello@openactive.io
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: Install
run: npm install
- name: Test
run: npm test
- name: Increment Version
run: npm version patch
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Push version update
run: git push
dispatch:
needs: publish
strategy:
matrix:
repo: ['data-model-validator-site', 'openactive-test-suite']
runs-on: ubuntu-latest
steps:
- name: Trigger tooling update
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
repository: openactive/${{ matrix.repo }}
event-type: data-model-validator-update