-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 1.46 KB
/
node.js.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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# need to use the Botty personal access token (PAT) so that this workflow can trigger other
# workflows. See https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
with:
token: ${{ secrets.BOTTY_TOKEN }}
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
registry-url: https://npm.pkg.github.com/
scope: "@hbkengineering"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{secrets.GPR_TOKEN}}
- run: npm run build --if-present
- run: npm test --if-present
- name: Autoversion
if: contains(github.event.head_commit.message, 'HBKEngineering/dependabot/')
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
npm version patch --force # --force ignores the deleted .npmrc file
git push --follow-tags