diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c45fb74..4287105 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,11 @@ on: push: branches: [ "main", "master" ] tags: - - "v*.*.*" # v1.0.0 や v0.1.0 などのタグが Push された時にトリガー + - "v*.*.*" pull_request: branches: [ "main", "master" ] workflow_dispatch: -# Release 作成権限を付与 permissions: contents: write @@ -21,12 +20,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - # arduino-cli と ESP32 コアのセットアップ + # 公式のアクションで arduino-cli をセットアップ - name: Setup Arduino CLI - uses: esp-cpp/setup-arduino-cli@v1 - with: - index-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - platforms: esp32:esp32@2.0.14 + uses: arduino/setup-arduino-cli@v2 + + # ESP32 パッケージインデックスの更新と 2.0.14 のインストール + - name: Install ESP32 Board Core (2.0.14) + run: | + arduino-cli config init + arduino-cli config set board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + arduino-cli core update-index + arduino-cli core install esp32:esp32@2.0.14 # 依存ライブラリのインストール - name: Install ESP32-A2DP library @@ -41,7 +45,7 @@ jobs: --build-property "upload.maximum_size=3145728" \ firmware/firmware.ino - # 通常の Artifacts 保存 (毎回実行) + # 通常の Artifacts 保存 - name: Upload Build Artifacts uses: actions/upload-artifact@v4 with: @@ -49,7 +53,7 @@ jobs: path: | firmware/build/esp32.esp32.esp32/*.bin - # GitHub Release の自動作成 & アセット添付 (タグ Push 時のみ実行) + # GitHub Release の自動作成 & アセット添付 (タグ Push 時のみ) - name: Create GitHub Release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v2