From c72f3d036cfad1b80ef0456093c0711544783cb9 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Wed, 5 Aug 2026 20:31:57 +0200 Subject: [PATCH] Publish builds over HTTP (/build/upload + /build/publish) --- .woodpecker.yml | 11 ++++------- Makefile | 19 ++++++------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 88f0031..382a6ff 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -47,14 +47,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-artifact' - name: update diff --git a/Makefile b/Makefile index 53b4d97..9a583d7 100644 --- a/Makefile +++ b/Makefile @@ -26,10 +26,6 @@ LINT_TMP_MAP := /tmp/_lint_map.txt # CI/CD variables VERSION_FILE = .version GAME_LANG ?= lua -DROPAREA_HOST ?= vps.teletype.hu -DROPAREA_PORT ?= 2223 -DROPAREA_TARGET_PATH ?= /home/drop -DROPAREA_USER ?= drop UPDATE_SERVER ?= https://teletypegames.org all: build @@ -289,18 +285,15 @@ ci-artifact: for slug in $(BINARY_SLUGS); do \ [ -f "$(PROJECT)-$$VERSION-$$slug.zip" ] && BINS="$$BINS $(PROJECT)-$$VERSION-$$slug.zip"; \ done; \ - SCP_TARGET="$(DROPAREA_USER)@$(DROPAREA_HOST):$(DROPAREA_TARGET_PATH)/"; \ - sshpass -p "$(DROPAREA_SSH_PASSWORD)" scp -o StrictHostKeyChecking=no -P $(DROPAREA_PORT) \ - $(PROJECT)-$$VERSION.lua \ - $(PROJECT)-$$VERSION.tic \ - $(PROJECT)-$$VERSION.html.zip \ - $(PROJECT)-$$VERSION-docs.zip \ - $$BINS \ - $$SCP_TARGET + for f in $(PROJECT)-$$VERSION.lua $(PROJECT)-$$VERSION.tic $(PROJECT)-$$VERSION.html.zip $(PROJECT)-$$VERSION-docs.zip $$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)); \ echo "==> Triggering update for version $$VERSION"; \ - curl "$(UPDATE_SERVER)/update?secret=$(UPDATE_SECRET)&name=$(PROJECT)&platform=tic80&version=$$VERSION" + curl -fsS -X POST -H "X-Update-Secret: $(UPDATE_SECRET)" "$(UPDATE_SERVER)/build/publish?name=$(PROJECT)&platform=tic80&version=$$VERSION" .PHONY: all build download-minify minify export binaries watch import_assets export_assets clean lint install_precommit_hook docs ci-version ci-lint ci-minify ci-docs ci-export ci-binaries ci-artifact ci-update