woodpeck 1

This commit is contained in:
era 2025-01-17 10:35:10 +03:30
parent 565389173c
commit bdda4696a4
No known key found for this signature in database
GPG Key ID: D09203E19A264BC3
2 changed files with 40 additions and 0 deletions

22
.woodpecker/cd.yaml Normal file
View File

@ -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]

18
.woodpecker/trigger.yaml Normal file
View File

@ -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