diff --git a/.woodpecker/cd.yaml b/.woodpecker/cd.yaml new file mode 100644 index 00000000..88d22689 --- /dev/null +++ b/.woodpecker/cd.yaml @@ -0,0 +1,22 @@ +when: + - event: tag + +steps: + - name: build + image: 3ra0/ballistica:dev + pull: true + commands: + - make prefab-linux-x86-64-gui-debug-build + - mv -v build/prefab/full/linux_x86_64_gui/debug build/prefab/full/linux_x86_64_gui/ballisticakit_linux_x86_64_debug + - tar cvzfC ballisticakit_linux_x86_64_debug.tar.xz build/prefab/full/linux_x86_64_gui ballisticakit_linux_x86_64_debug + - name: publish + image: woodpeckerci/plugin-release + settings: + api_key: + from_secret: ACCESS_TOKEN + files: + - 'ballisticakit_linux_x86_64.tar.xz' + prerelease: true + note: 'These are automated debug prefab builds; use them for testing purposes only.' + title: 'auto pre-release' + depends_on: [build] diff --git a/.woodpecker/trigger.yaml b/.woodpecker/trigger.yaml new file mode 100644 index 00000000..8d77112f --- /dev/null +++ b/.woodpecker/trigger.yaml @@ -0,0 +1,18 @@ +when: + - event: push + +skip_clone: true + +steps: + - name: tag + image: alpine/curl + environment: + ACCESS_TOKEN: + from_secret: ACCESS_TOKEN + commands: + - >- + curl -s -o /dev/null -X "DELETE" "https://codeberg.org/api/v1/repos/$CI_REPO/releases/tags/auto.latest" -H "accept: application/json" -H "Authorization: token $ACCESS_TOKEN" + - >- + curl -s -o /dev/null -X "DELETE" "https://codeberg.org/api/v1/repos/$CI_REPO/tags/auto.latest" -H "accept: application/json" -H "Authorization: token $ACCESS_TOKEN" + - >- + if [ $(curl -s -o /dev/null -w "%{http_code}" -X "POST" "https://codeberg.org/api/v1/repos/$CI_REPO/tags" -H "accept: application/json" -H "Authorization: token $ACCESS_TOKEN" -H "Content-Type: application/json" -d "{\"message\": \"AUTO TRIGGER TAG\", \"tag_name\": \"auto.latest\", \"target\": \"$CI_COMMIT_SHA\"}") != "201" ]; then exit 1; fi