Skip to content

merge

merge #8

Workflow file for this run

name: Beta Release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.5.1
with:
node-version: 12
- name: npm install, test and build
run: |
npm ci
npm test
npm run build --if-present
env:
CI: true
publish-npm-beta:
# publish only if we are on our own repo, event was 'release' (a tag was created) and the tag starts with "v" (aka version tag)
if: github.repository == 'petro-kushchak/homebridge-ch-ac-eve' && startsWith(github.ref, 'refs/heads/master')
needs: build # only run if build succeeds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/setup-node@v2.5.1
with:
node-version: 12 # use the minimum required version
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm test
- run: node .github/workflows/prerelease.js
- run: npm --no-git-tag-version version prerelease --preid=beta
- run: npm publish --access=public --tag=beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}