diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..4e48319 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,47 @@ +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: [push, tag, manual] + tag: v* + branch: main + + test: + image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest + commands: + - nix develop --command scripts/test.sh + when: + event: [push, manual] + branch: main + + release-main: + image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest + commands: + - nix develop --command scripts/release.sh + secrets: + - gitea_token + - git_credentials + when: + event: [push, manual] + 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/push.yml b/.woodpecker/push.yml deleted file mode 100644 index e33888c..0000000 --- a/.woodpecker/push.yml +++ /dev/null @@ -1,26 +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 - - nix develop --command scripts/test.sh - when: - event: [push, pull_request] - release: - image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest - commands: - - export DRONE="true" # Required to convince `env-ci` that it is a known CI - - git branch $DRONE_BRANCH origin/$DRONE_BRANCH # semantic-release needs this locally - - nix develop --command scripts/release.sh - secrets: - - gitea_token - - git_credentials - when: - event: [push] - branch: main diff --git a/.woodpecker/tag.yml b/.woodpecker/tag.yml deleted file mode 100644 index 46641a9..0000000 --- a/.woodpecker/tag.yml +++ /dev/null @@ -1,27 +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: - - "*.pdf" - - "*.epub" - secrets: - - source: gitea_token - target: plugin_api_key - when: - event: [tag] - tag: v*