Skip to content

Add firmware update for U-BOLT-PRO-ZWAVE (Ultraloq) #195

Add firmware update for U-BOLT-PRO-ZWAVE (Ultraloq)

Add firmware update for U-BOLT-PRO-ZWAVE (Ultraloq) #195

name: Test and Release
# Run this job on all pushes to main and for pull requests
on:
push:
branches:
# This avoids having duplicate builds in non-forked PRs
- "main"
pull_request: {}
# Cancel previous PR/branch runs when a new commit is pushed
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
# ===================
# Tests everything
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x] # This should be LTS
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Check TypeScript code
run: yarn check
- name: Compile TypeScript code
run: yarn build
- name: Run linter
run: yarn run lint
- name: Try to generate index file
run: yarn build:index
- name: Run component tests
run: yarn run test:ci
- name: Check file download/integrity of changed files
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const script = require(`${process.env.GITHUB_WORKSPACE}/.github/scripts/check-integrity.cjs`);
return script({github, context, core});
# ===================
# Deploys successful builds on the main branch to Cloudflare
deploy:
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
needs: [test]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x] # This should be LTS
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Generate index file
run: yarn build:index
- name: Publish to Cloudflare
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Upload config files to Cloudflare
env:
BASE_URL: ${{ secrets.BASE_URL }}
ADMIN_SECRET: ${{ secrets.ADMIN_SECRET }}
run: yarn upload