Publish builds over HTTP (/build/upload + /build/publish)
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2026-08-05 20:31:57 +02:00
parent 4404e5d389
commit c72f3d036c
2 changed files with 10 additions and 20 deletions
+4 -7
View File
@@ -47,14 +47,11 @@ steps:
- name: artifact - name: artifact
image: alpine image: alpine
environment: environment:
DROPAREA_HOST: vps.teletype.hu UPDATE_SERVER: https://teletypegames.org
DROPAREA_PORT: 2223 UPDATE_SECRET:
DROPAREA_TARGET_PATH: /home/drop from_secret: update_secret_key
DROPAREA_USER: drop
DROPAREA_SSH_PASSWORD:
from_secret: droparea_ssh_password
commands: commands:
- 'apk add --no-cache make openssh-client sshpass' - 'apk add --no-cache make curl'
- 'make ci-artifact' - 'make ci-artifact'
- name: update - name: update
+6 -13
View File
@@ -26,10 +26,6 @@ LINT_TMP_MAP := /tmp/_lint_map.txt
# CI/CD variables # CI/CD variables
VERSION_FILE = .version VERSION_FILE = .version
GAME_LANG ?= lua GAME_LANG ?= lua
DROPAREA_HOST ?= vps.teletype.hu
DROPAREA_PORT ?= 2223
DROPAREA_TARGET_PATH ?= /home/drop
DROPAREA_USER ?= drop
UPDATE_SERVER ?= https://teletypegames.org UPDATE_SERVER ?= https://teletypegames.org
all: build all: build
@@ -289,18 +285,15 @@ ci-artifact:
for slug in $(BINARY_SLUGS); do \ for slug in $(BINARY_SLUGS); do \
[ -f "$(PROJECT)-$$VERSION-$$slug.zip" ] && BINS="$$BINS $(PROJECT)-$$VERSION-$$slug.zip"; \ [ -f "$(PROJECT)-$$VERSION-$$slug.zip" ] && BINS="$$BINS $(PROJECT)-$$VERSION-$$slug.zip"; \
done; \ done; \
SCP_TARGET="$(DROPAREA_USER)@$(DROPAREA_HOST):$(DROPAREA_TARGET_PATH)/"; \ for f in $(PROJECT)-$$VERSION.lua $(PROJECT)-$$VERSION.tic $(PROJECT)-$$VERSION.html.zip $(PROJECT)-$$VERSION-docs.zip $$BINS; do \
sshpass -p "$(DROPAREA_SSH_PASSWORD)" scp -o StrictHostKeyChecking=no -P $(DROPAREA_PORT) \ curl -fsS -H "X-Update-Secret: $(UPDATE_SECRET)" \
$(PROJECT)-$$VERSION.lua \ -F "file=@$$f" \
$(PROJECT)-$$VERSION.tic \ "$(UPDATE_SERVER)/build/upload?name=$(PROJECT)&version=$$VERSION" || exit 1; \
$(PROJECT)-$$VERSION.html.zip \ done
$(PROJECT)-$$VERSION-docs.zip \
$$BINS \
$$SCP_TARGET
ci-update: ci-update:
@VERSION=$$(cat $(VERSION_FILE)); \ @VERSION=$$(cat $(VERSION_FILE)); \
echo "==> Triggering update for version $$VERSION"; \ 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 .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