From 5bb87944051dc7578098d5fd281e2392abb0ec97 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Wed, 5 Aug 2026 20:32:02 +0200 Subject: [PATCH] Publish builds over HTTP (/build/upload + /build/publish) --- .woodpecker.yaml | 11 ++++------- Makefile | 10 ++++++---- README.md | 4 ++-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index a69e0ad..25e4ab8 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -14,14 +14,11 @@ steps: - name: artifact image: alpine environment: - DROPAREA_HOST: vps.teletype.hu - DROPAREA_PORT: 2223 - DROPAREA_TARGET_PATH: /home/drop - DROPAREA_USER: drop - DROPAREA_SSH_PASSWORD: - from_secret: droparea_ssh_password + UPDATE_SERVER: https://teletypegames.org + UPDATE_SECRET: + from_secret: update_secret_key commands: - - apk add --no-cache make openssh-client sshpass + - apk add --no-cache make curl - make ci-upload - name: update diff --git a/Makefile b/Makefile index f93d9db..7938c6b 100644 --- a/Makefile +++ b/Makefile @@ -129,12 +129,14 @@ ci-upload: META_DST="$(PROJECT)-$$VERSION.metadata.json"; \ BINS=$$(ls $(PROJECT)-$$VERSION-*.zip 2>/dev/null || true); \ cp $$META_SRC $$META_DST; \ - sshpass -p "$(DROPAREA_SSH_PASSWORD)" scp -o StrictHostKeyChecking=no -P $(DROPAREA_PORT) \ - $$FILE $$META_DST $$BINS \ - $(DROPAREA_USER)@$(DROPAREA_HOST):$(DROPAREA_TARGET_PATH)/ + for f in $$FILE $$META_DST $$BINS; do \ + curl -fsS -H "X-Update-Secret: $(UPDATE_SECRET)" \ + -F "file=@$$f" \ + "$(UPDATE_SERVER)/build/upload?name=$(PROJECT)&version=$$VERSION" || exit 1; \ + done ci-update: @VERSION=$$(cat $(VERSION_FILE)); \ - curl "$(UPDATE_SERVER)/update?secret=$(UPDATE_SECRET)&name=$(PROJECT)&platform=godot&version=$$VERSION" + curl -fsS -X POST -H "X-Update-Secret: $(UPDATE_SECRET)" "$(UPDATE_SERVER)/build/publish?name=$(PROJECT)&platform=godot&version=$$VERSION" .PHONY: all build run web export watch clean binaries binary-win-x86 binary-win-x64 binary-linux-x64 binary-mac-universal binary-build binary-build-mac ci-version ci-export ci-binaries ci-upload ci-update diff --git a/README.md b/README.md index 0717f5f..25a1e4f 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,8 @@ VS Code tasks. ## CI/CD Woodpecker builds every push (`.woodpecker.yaml`): version → headless -web export (`barichello/godot-ci` image) → upload to the droparea → -`/update?platform=godot` on teletypegames.org. The version comes from +web export (`barichello/godot-ci` image) → upload via `/build/upload` → +`/build/publish?platform=godot` on teletypegames.org. The version comes from `metadata.json` (non-main branches get a `dev-` prefix). Keep the `barichello/godot-ci` image tag in sync with the Godot version the project is edited with.