diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index f240c67..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,45 +0,0 @@ -include: - - template: Security/SAST.gitlab-ci.yml - -stages: - - build - - test - - release - -default: - image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest - -build: - stage: build - script: - - nix develop --command scripts/build.sh - rules: - - if: $CI_COMMIT_BRANCH - -test: - stage: test - script: - - nix develop --command scripts/test.sh - artifacts: - when: always - paths: - - ./**/*test-result.xml - - ./coverage/Cobertura.xml - - ./coverage/Summary.* - - ./**/*.nupkg - reports: - junit: - - ./**/*test-result.xml - cobertura: - - ./coverage/Cobertura.xml - -publish: - stage: release - before_script: - # Set it up so we can push the tag - - project_url=$(echo $CI_PROJECT_URL | sed 's/https:\/\///') - - git remote set-url origin https://oauth2:$GITLAB_TOKEN@$project_url - script: - - nix develop --command scripts/release.sh - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..3f25d63 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,36 @@ +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, 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] + #paths: + # - ./**/*test-result.xml + # - ./coverage/Cobertura.xml + # - ./coverage/Summary.* + # - ./**/*.nupkg + + release-main: + image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest + commands: + - nix develop --command scripts/release.sh + secrets: + - gitea_token + when: + event: push + branch: main