Switch the CI templates to the /build HTTP endpoints
This commit is contained in:
@@ -12,8 +12,8 @@ and [tic80-tools](../tic80-tools).
|
||||
`ci-upload`, `ci-update`).
|
||||
- `example-woodpecker.yaml` — Woodpecker pipeline: version → build
|
||||
(headless web export + desktop binaries in the `barichello/godot-ci`
|
||||
image) → upload (scp to the droparea) → update (calls the
|
||||
teletypegames `/update` endpoint with `platform=godot`).
|
||||
image) → upload (HTTP POST to `/build/upload`) → update (calls the
|
||||
teletypegames `/build/publish` endpoint with `platform=godot`).
|
||||
- `example-export_presets.cfg` — `export_presets.cfg` with the **Web**
|
||||
preset the Makefile exports plus the desktop presets (**Windows
|
||||
x86**, **Windows x64**, **Linux x64**, **Mac universal**). Web
|
||||
@@ -41,7 +41,7 @@ and [tic80-tools](../tic80-tools).
|
||||
textures/vram_compression/import_etc2_astc=true
|
||||
```
|
||||
3. Copy `example-woodpecker.yaml` to `.woodpecker.yaml` and add the
|
||||
`droparea_ssh_password` / `update_secret_key` secrets in Woodpecker.
|
||||
`update_secret_key` secret in Woodpecker.
|
||||
Match the `godot-builder` image tag to the Godot version the
|
||||
project is made with (e.g. `4.6`) — the underlying
|
||||
`barichello/godot-ci` image ships the matching export templates.
|
||||
@@ -49,8 +49,8 @@ and [tic80-tools](../tic80-tools).
|
||||
|
||||
The pipeline uploads `$(PROJECT)-$(VERSION).html.zip` and the desktop
|
||||
binary zips (`$(PROJECT)-$(VERSION)-<target>.zip`, targets: `win-x86`,
|
||||
`win-x64`, `linux-x64`, `mac-universal`) to the droparea, then triggers
|
||||
`/update?platform=godot&name=$(PROJECT)&version=$(VERSION)`, which
|
||||
`win-x64`, `linux-x64`, `mac-universal`) via `/build/upload`, then triggers
|
||||
`/build/publish?platform=godot&name=$(PROJECT)&version=$(VERSION)`, which
|
||||
attaches them to the release as ReleaseAssets. Godot cross-exports all
|
||||
desktop platforms from the linux CI image with the official export
|
||||
templates; mac is a single universal (intel + arm) build with Godot's
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user