Skip to content

Commit

Permalink
Added missing CI step for prs and master push (#50)
Browse files Browse the repository at this point in the history
* added a build step to prs and pushed commits

* upgraded publishing node version to LTS

* added name to node setup
  • Loading branch information
Xetera committed Mar 4, 2021
1 parent be0f946 commit aef08ca
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build library

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14]
steps:
- uses: actions/checkout@master
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org/
- name: Compile typescript
run: npm run build
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm publish --unsafe-perm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_SECRET}}
NODE_AUTH_TOKEN: ${{secrets.NPM_SECRET}}

0 comments on commit aef08ca

Please sign in to comment.