Skip to content

chore: rebrand to homebridge-kasa and bump to 8.0.5 #3

chore: rebrand to homebridge-kasa and bump to 8.0.5

chore: rebrand to homebridge-kasa and bump to 8.0.5 #3

Workflow file for this run

name: Deploy to npm
on:
workflow_dispatch:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Test
run: npm run test:only
- name: Publish to npm
run: |
VERSION=$(node -p "require('./package.json').version")
PACKAGE=$(node -p "require('./package.json').name")
OUTPUT=$(npm publish --provenance --access public 2>&1) || {
if echo "$OUTPUT" | grep -q "cannot publish over the previously published"; then
echo "${PACKAGE}@${VERSION} already published, skipping"
exit 0
fi
echo "$OUTPUT" >&2
exit 1
}
echo "$OUTPUT"