Housekeeping #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node-CI Beta | |
on: | |
push: | |
branches: [beta] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: npm install, build # and test | |
run: | | |
npm ci | |
npm run build | |
# We don't yet have any tests setup | |
# npm test | |
env: | |
CI: true | |
publish-npm: | |
if: github.repository == 'node-alarm-dot-com/homebridge-node-alarm-dot-com' | |
needs: build # only run if build succeeds | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 # use the minimum required version | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: node .github/workflows/prerelease.js | |
- run: npm --no-git-tag-version version pre --preid=beta | |
- run: npm publish --tag=beta | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |