-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e6cfe3
commit 0f39148
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |