publish
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Koichi Ito 2026-10-10 17:58:48 +09:00
parent 5fb3dd5daf
commit 1e42557659
1 changed files with 23 additions and 2 deletions

View File

@ -55,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: