diff --git a/.github/workflows/Build and Publish.yml b/.github/workflows/Build and Publish.yml index c9d5bf2..d30684e 100644 --- a/.github/workflows/Build and Publish.yml +++ b/.github/workflows/Build and Publish.yml @@ -1,4 +1,4 @@ -name: "Build and Publish" +name: "Build, Test and Publish" # Simple automated publishing for projects @@ -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: @@ -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 @@ -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] @@ -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 \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a735c95..f4bc360 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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' diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 7df0f76..0c4bdf8 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,7 +1,7 @@ name: Node Build on: push: - branches: [master] + branches: [latest] pull_request: workflow_dispatch: diff --git a/package-lock.json b/package-lock.json index 52c1b2c..6b5830b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bonjour-hap", - "version": "3.7.0", + "version": "3.7.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bonjour-hap", - "version": "3.7.0", + "version": "3.7.2", "license": "MIT", "dependencies": { "array-flatten": "^2.1.2", diff --git a/package.json b/package.json index c6fba24..995db8a 100644 --- a/package.json +++ b/package.json @@ -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 (https://twitter.com/wa7son)",