Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple more tweaks #21

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions .github/workflows/Build and Publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Build and Publish"
name: "Build, Test and Publish"

# Simple automated publishing for projects

Expand All @@ -15,7 +15,7 @@ name: "Build and Publish"
# 4 - As updates are made to the beta branch, npm beta releases will be created.
# 5 - Once the release is complete, and ready for latest/production release, create a pull request to merge the changes into the `latest` branch.
# 6 - After reviews are complete, merge the pull request
# 7 - For the latest/production release, the workflow must be manually kicked off / started from Actions --> Build and Publish
# 7 - For the latest/production release, the workflow must be manually kicked off / started from Actions --> Build, Test and Publish
# 8 - Delete beta branch

on:
Expand Down Expand Up @@ -49,18 +49,31 @@ jobs:
BRANCH_NAME: ${{ steps.get_branch.outputs.BRANCH_NAME }}
TARGET_IMAGE_TAG: ${{ steps.get_tag.outputs.TARGET_IMAGE_TAG }}

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
lint-docs:
needs: build_and_test
uses: homebridge/.github/.github/workflows/lint-docs.yml@latest

publish_prod_release:
needs: get_tags
needs: [get_tags, lint, lint-docs]
name: Publish Release Version
if: ${{ needs.get_tags.outputs.BRANCH_NAME == 'latest' }}
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
with:
install_cmd: npm ci
secrets:
npm_auth_token: ${{ secrets.npm_token }}
npm_auth_token: ${{ secrets.NPM_TOKEN }}

publish_test:
needs: get_tags
needs: [get_tags, lint, lint-docs]
name: Publish Test Version - ${{ needs.get_tags.outputs.BRANCH_NAME }}
if: ${{ needs.get_tags.outputs.BRANCH_NAME != 'latest' }}
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
Expand All @@ -70,7 +83,7 @@ jobs:
npm_version_command: 'pre'
pre_id: ${{ needs.get_tags.outputs.TARGET_IMAGE_TAG }}
secrets:
npm_auth_token: ${{ secrets.npm_token }}
npm_auth_token: ${{ secrets.NPM_TOKEN }}

publish_github_release:
needs: [publish_prod_release]
Expand All @@ -82,8 +95,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.publish_prod_release.outputs.NPM_VERSION }}
name: Release ${{ needs.publish_prod_release.outputs.NPM_VERSION }}
tag_name: v${{ needs.publish_prod_release.outputs.NPM_VERSION }}
name: Release v${{ needs.publish_prod_release.outputs.NPM_VERSION }}
generate_release_notes: true
draft: false
prerelease: false
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ latest ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ latest ]
schedule:
- cron: '35 12 * * 2'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Node Build
on:
push:
branches: [master]
branches: [latest]
pull_request:
workflow_dispatch:

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bonjour-hap",
"version": "3.7.1",
"version": "3.7.2",
"description": "A Bonjour/Zeroconf implementation in pure JavaScript (for HAP)",
"main": "index.js",
"author": "Thomas Watson Steen <[email protected]> (https://twitter.com/wa7son)",
Expand Down
Loading