Skip to content

Merge pull request #33 from particle-iot/feature/network-option #174

Merge pull request #33 from particle-iot/feature/network-option

Merge pull request #33 from particle-iot/feature/network-option #174

Workflow file for this run

name: CI/CD
on:
push:
branches:
- '**'
tags:
- 'v*'
jobs:
test:
name: Test (Node.js v${{ matrix.node }})
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.optional }}
strategy:
fail-fast: false
matrix:
node:
- 12
- 14
- 16
optional:
- false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: npm-shrinkwrap.json
- run: npm install
- run: npm test
publish:
name: Publish
runs-on: ubuntu-latest
needs: test
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
cache-dependency-path: npm-shrinkwrap.json
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}