From 1503631669ca55bc454f23d31f5300e5bab00c2c Mon Sep 17 00:00:00 2001 From: "D. Moonfire" Date: Tue, 20 Dec 2022 18:05:25 -0600 Subject: [PATCH] ci: working on setup --- .woodpecker/push.yml => .woodpecker.yml | 25 +++++++++++++++++++++++-- .woodpecker/tag.yml | 25 ------------------------- 2 files changed, 23 insertions(+), 27 deletions(-) rename .woodpecker/push.yml => .woodpecker.yml (60%) delete mode 100644 .woodpecker/tag.yml diff --git a/.woodpecker/push.yml b/.woodpecker.yml similarity index 60% rename from .woodpecker/push.yml rename to .woodpecker.yml index e33888c..af55983 100644 --- a/.woodpecker/push.yml +++ b/.woodpecker.yml @@ -9,10 +9,18 @@ pipeline: image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest commands: - nix develop --command scripts/build.sh + when: + event: [push, pull_request, tag] + tag: v* + + test: + image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest + commands: - nix develop --command scripts/test.sh when: event: [push, pull_request] - release: + + release-main: image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest commands: - export DRONE="true" # Required to convince `env-ci` that it is a known CI @@ -22,5 +30,18 @@ pipeline: - gitea_token - git_credentials when: - event: [push] + event: push branch: main + + release-gitea: + image: plugins/gitea-release + settings: + base_url: https://src.mfgames.com + files: + - "*.pdf" + - "*.epub" + api_key: + from_secret: gitea_token + when: + event: tag + tag: v* diff --git a/.woodpecker/tag.yml b/.woodpecker/tag.yml deleted file mode 100644 index 083b55a..0000000 --- a/.woodpecker/tag.yml +++ /dev/null @@ -1,25 +0,0 @@ -clone: - git: - image: woodpeckerci/plugin-git - settings: - tags: true - -pipeline: - build: - image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest - commands: - - nix develop --command scripts/build.sh - when: - event: [tag] - tag: v* - gitea: - image: plugins/gitea-release - settings: - base_url: https://src.mfgames.com - files: exit-planning*.* - secrets: - - source: gitea_token - target: plugin_api_key - when: - event: [tag] - tag: v*