Skip to content

🚀 Release

🚀 Release #11

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: '🚀 Release'
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
env:
CI: true
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Test
run: npm run test
env:
MQTT_HOST: ${{ secrets.MQTT_HOST }}
PORT: ${{ secrets.MQTT_HOST }}
publish-npm:
name: 🚀 npm publish
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build --if-present
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
publish-gpr:
name: 🚀 github publish
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm run build --if-present
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}