Skip to content

Commit

Permalink
Update NodeJS workflow, see #506
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Jul 3, 2022
1 parent 5ed2a92 commit 55b8f83
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
name: NodeJS
on:
push:
#tags:
# - 'v*'
branches:
- master
pull_request:
branches:
- master
tags:
- 'v*'

jobs:
test:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [18]
node: [14]

runs-on: ${{ matrix.os }}

Expand All @@ -25,12 +20,14 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install
- name: Test build from source
run: |
npm --prefix bindings/js ci
npm --prefix bindings/js test
npm --prefix bindings/js run prebuildify
- name: Install
run: npm --prefix bindings/js run prebuildify

- uses: actions/upload-artifact@v3
with:
Expand All @@ -39,12 +36,16 @@ jobs:

deploy:
runs-on: ubuntu-latest
needs: [test]
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3

- uses: actions/download-artifact@v2
with:
path: bindings/js/prebuilds
- run: npm publish

- run: npm --prefix bindings/js publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit 55b8f83

Please sign in to comment.