Skip to content

Commit

Permalink
add workflow for npm publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Nov 4, 2023
1 parent cd94e55 commit 73c069f
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Node-CI Beta

on:
push:
branches: [beta-*.*.*, beta]
workflow_dispatch:

jobs:
build_and_test:
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
with:
enable_coverage: true
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
lint:
needs: build_and_test
uses: homebridge/.github/.github/workflows/eslint.yml@latest

publish:
needs: lint

if: ${{ github.repository == 'homebridge/camera-utils' }}

uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
with:
tag: 'beta'
dynamically_adjust_version: true
npm_version_command: 'pre'
pre_id: 'beta'
secrets:
npm_auth_token: ${{ secrets.npm_token }}
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [ latest, beta* ]
schedule:
- cron: '44 16 * * 5'
- cron: '17 9 * * 2'

jobs:
analyze:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Drafter

on:
push:
branches: [latest]
pull_request: # required for autolabeler
types: [opened, reopened, synchronize]
workflow_dispatch:

jobs:
stale:
uses: homebridge/.github/.github/workflows/release-drafter.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Node Release

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:

jobs:
build_and_test:
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
with:
enable_coverage: true
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

publish:
needs: build_and_test

if: ${{ github.repository == 'homebridge/camera-utils' }}

uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
secrets:
npm_auth_token: ${{ secrets.npm_token }}

0 comments on commit 73c069f

Please sign in to comment.