-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.25 KB
/
publish-to-npm.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
name: Publish to npm
on:
push:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.author.email, '[email protected]')"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
- name: Identify
run: |
git config user.name OpenActive Bot
git config user.email [email protected]
- 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 ci
- 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: ['openactive-test-suite']
runs-on: ubuntu-latest
steps:
- name: Trigger tooling update
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
repository: openactive/${{ matrix.repo }}
event-type: harvesting-utils-update