diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index 3a82c641..19b6d295 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -3,8 +3,6 @@ name: Node-CI Beta on: push: branches: [beta-*.*.*, beta] - release: - types: [prereleased] workflow_dispatch: jobs: @@ -14,15 +12,14 @@ jobs: enable_coverage: true secrets: token: ${{ secrets.GITHUB_TOKEN }} + lint: needs: build_and_test uses: OpenWonderLabs/.github/.github/workflows/eslint.yml@latest publish: needs: lint - if: ${{ github.repository == 'OpenWonderLabs/homebridge-switchbot' }} - uses: OpenWonderLabs/.github/.github/workflows/npm-publish.yml@latest with: tag: 'beta' @@ -32,13 +29,23 @@ jobs: secrets: npm_auth_token: ${{ secrets.npm_token }} - github-releases-to-discord: + pre-release: needs: publish + if: ${{ github.repository == 'OpenWonderLabs/homebridge-switchbot' }} + uses: OpenWonderLabs/.github/.github/workflows/pre-release.yml@latest + with: + npm_version: ${{ needs.publish.outputs.NPM_VERSION }} + body: | + **Beta Release** + **Version**: v${{ needs.publish.outputs.NPM_VERSION }} + [How To Test Beta Releases](https://github.com/OpenWonderLabs/homebridge-switchbot/wiki/Beta-Version) - if: ${{ github.repository == 'OpenWonderLabs/homebridge-switchbot' && github.event.release.prerelease == true }} - + github-releases-to-discord: + needs: pre-release + if: ${{ github.repository == 'OpenWonderLabs/homebridge-switchbot' }} uses: OpenWonderLabs/.github/.github/workflows/discord-webhooks.yml@latest with: - footer_title: "SwitchBot" + message_title: "SwitchBot" + message_url: "https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}" secrets: DISCORD_WEBHOOK_URL_BETA: ${{ secrets.DISCORD_WEBHOOK_URL_BETA }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09a2eeee..a0b9a672 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,8 @@ jobs: uses: OpenWonderLabs/.github/.github/workflows/discord-webhooks.yml@latest with: - footer_title: "SwitchBot" + message_title: "SwitchBot" + message_url: "https://github.com/OpenWonderLabs/homebridge-switchbot/releases/latest" secrets: DISCORD_WEBHOOK_URL_LATEST: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} diff --git a/package.json b/package.json index ffae3f76..973b6def 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@switchbot/homebridge-switchbot", "displayName": "SwitchBot", "type": "module", - "version": "3.8.2", + "version": "3.8.3", "description": "The SwitchBot plugin allows you to access your SwitchBot device(s) from HomeKit.", "author": "SwitchBot (https://github.com/SwitchBot)", "contributors": [ @@ -107,7 +107,6 @@ "ts-node": "^10.9.2", "typedoc": "^0.26.7", "typescript": "^5.6.2", - "typescript-axios-wb": "^1.0.3", "vitest": "^2.1.1" }, "directories": {