diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3c82e5..42a29d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,6 @@ name: Build on: - push: - branches: - - main pull_request: workflow_dispatch: release: @@ -16,25 +13,59 @@ concurrency: jobs: build-firmware: name: Build Firmware - uses: esphome/workflows/.github/workflows/build.yml@main + uses: esphome/workflows/.github/workflows/build.yml@2024.11.1 with: files: | esp32-s3-box/esp32-s3-box.factory.yaml esp32-s3-box-lite/esp32-s3-box-lite.factory.yaml esp32-s3-box-3/esp32-s3-box-3.factory.yaml m5stack-atom-echo/m5stack-atom-echo.factory.yaml - esphome-version: 2024.9.0 + esphome-version: 2024.11.1 release-summary: ${{ github.event_name == 'release' && github.event.release.body || '' }} release-url: ${{ github.event_name == 'release' && github.event.release.html_url || '' }} release-version: ${{ github.event_name == 'release' && github.event.release.tag_name || '' }} - upload: + upload-to-r2: if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') name: Upload to R2 needs: - build-firmware - uses: esphome/workflows/.github/workflows/upload.yml@main + uses: esphome/workflows/.github/workflows/upload-to-r2.yml@2024.11.1 with: directory: wake-word-voice-assistant - version: ${{ needs.build-firmware.outputs.version }} + secrets: inherit + + upload-to-release: + name: Upload to Release + if: github.event_name == 'release' + uses: esphome/workflows/.github/workflows/upload-to-gh-release.yml@2024.11.1 + needs: + - build-firmware + with: + version: ${{ github.event.release.tag_name }} + + promote-beta: + name: Promote to Beta + if: github.event_name == 'release' + uses: esphome/workflows/.github/workflows/promote-r2.yml@2024.11.1 + needs: + - upload-to-r2 + with: + version: ${{ github.event.release.tag_name }} + directory: wake-word-voice-assistant + channel: beta + manifest-filename: manifest-beta.json + secrets: inherit + + promote-prod: + name: Promote to Production + if: github.event_name == 'release' && github.event.release.prerelease == false + uses: esphome/workflows/.github/workflows/promote-r2.yml@2024.11.1 + needs: + - upload-to-r2 + with: + version: ${{ github.event.release.tag_name }} + directory: wake-word-voice-assistant + channel: production + manifest-filename: manifest.json secrets: inherit