Compare commits
No commits in common. "1e42557659b43b3b850d6bf976ce00a6faf38796" and "7fef8ec6c737f7ad209b3694568bbc95500e6bfe" have entirely different histories.
1e42557659
...
7fef8ec6c7
40
.drone.yml
40
.drone.yml
|
|
@ -27,8 +27,19 @@ 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 core update-index
|
- arduino-cli config set network.connection_timeout 300s
|
||||||
- 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
|
||||||
|
|
@ -55,32 +66,11 @@ steps:
|
||||||
mv build/firmware.ino.bin build/firmware.bin
|
mv build/firmware.ino.bin build/firmware.bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- 2. flash.j-code.org/download へ成果物を公開 ---
|
# --- 2. タグPush時(v*.*.*)に Gitea へリリース作成 & バイナリ添付 ---
|
||||||
# /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
|
base_url: https://gitea.j-code.org # あなたの Gitea の URL に変更してください
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: gitea_token # Drone Secrets に登録した Access Token
|
from_secret: gitea_token # Drone Secrets に登録した Access Token
|
||||||
files:
|
files:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue