Compare commits

...

2 Commits

Author SHA1 Message Date
Koichi Ito 1e42557659 publish
continuous-integration/drone/push Build is passing Details
2026-10-10 17:58:48 +09:00
Koichi Ito 5fb3dd5daf remove retry 2026-10-10 16:41:22 +09:00
1 changed files with 25 additions and 15 deletions

View File

@ -27,19 +27,8 @@ steps:
# ESP32 パッケージインデックスの更新と 2.0.14 のインストール # ESP32 パッケージインデックスの更新と 2.0.14 のインストール
- arduino-cli config init --overwrite - arduino-cli config init --overwrite
- arduino-cli config set board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - arduino-cli config set board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- arduino-cli config set network.connection_timeout 300s - arduino-cli core update-index
- | - arduino-cli core install esp32:esp32@2.0.14
for i in $(seq 1 5); do
arduino-cli core update-index && break
if [ "$i" = 5 ]; then exit 1; fi
echo "update-index retry $i failed, waiting..."; sleep 10
done
- |
for i in $(seq 1 5); do
arduino-cli core install esp32:esp32@2.0.14 && break
if [ "$i" = 5 ]; then exit 1; fi
echo "core install retry $i failed, waiting..."; sleep 10
done
# ライブラリのインストール # ライブラリのインストール
- mkdir -p /root/Arduino/libraries - mkdir -p /root/Arduino/libraries
- git clone https://github.com/pschatzmann/ESP32-A2DP.git /root/Arduino/libraries/ESP32-A2DP - git clone https://github.com/pschatzmann/ESP32-A2DP.git /root/Arduino/libraries/ESP32-A2DP
@ -66,11 +55,32 @@ steps:
mv build/firmware.ino.bin build/firmware.bin mv build/firmware.ino.bin build/firmware.bin
fi fi
# --- 2. タグPush時(v*.*.*)に Gitea へリリース作成 & バイナリ添付 --- # --- 2. flash.j-code.org/download へ成果物を公開 ---
# /publish はランナー設定(DRONE_RUNNER_VOLUMES)でホストの flash/download に紐付いている
# 公開先: /download/<リポジトリ名>/latest/ (ブランチPush時)、/download/<リポジトリ名>/<タグ>/ (タグ時)
- name: publish-to-flash
image: alpine:3
commands:
- |
if [ "$DRONE_BUILD_EVENT" = "tag" ]; then
DEST="/publish/$DRONE_REPO_NAME/$DRONE_TAG"
else
DEST="/publish/$DRONE_REPO_NAME/latest"
fi
mkdir -p "$DEST"
cp build/bootloader.bin build/partitions.bin build/firmware.bin "$DEST/"
chmod -R a+rX "/publish/$DRONE_REPO_NAME"
echo "公開先: https://flash.j-code.org/download/${DEST#/publish/}/"
when:
event:
- push
- tag
# --- 3. タグPush時(v*.*.*)に Gitea へリリース作成 & バイナリ添付 ---
- name: release-to-gitea - name: release-to-gitea
image: plugins/gitea-release image: plugins/gitea-release
settings: settings:
base_url: https://gitea.j-code.org # あなたの Gitea の URL に変更してください base_url: https://gitea.j-code.org
api_key: api_key:
from_secret: gitea_token # Drone Secrets に登録した Access Token from_secret: gitea_token # Drone Secrets に登録した Access Token
files: files: