From af8a6144805740f31794697350a360d5e9975c40 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Wed, 9 Sep 2026 17:14:47 -0400 Subject: [PATCH] Adding Woodpecker CI config --- .woodpecker.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..d7324cf --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,45 @@ +when: + event: + - push + - pull_request + - tag + +steps: + test-build: + image: tinygo/tinygo:0.42.0 + commands: + # Fix dubious ownership issues because you can't disable it with tinygo + - git config --global --add safe.directory "$PWD" + # Ensure modules are resolved and tidy + - go mod download + - go mod verify + + # Copy template config for the build check if config.go doesn't exist + - if [ ! -f config.go ]; then cp config.go.example config.go; fi + + # Compile to an ELF/binary to ensure no syntax, link, or driver errors + - tinygo build -target=pico2-w -o /dev/null . + + # Clean up the config.go copy + - rm -f config.go + + package: + image: alpine:latest + commands: + - mkdir -p dist + # Tar up Python files and example configs into a versioned archive + - tar -czf dist/pico-clock-${CI_COMMIT_TAG:-dev}.tar.gz *.go go.* config.go.example README.md + when: + event: tag + + gitea_release: + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_api_key + base_url: https://git.metaunix.net + title: "${CI_COMMIT_TAG}" + files: + - dist/pico-clock-*.tar.gz + when: + event: tag