--- stages: - tests - build - upload - release - publish tests: image: docker.io/brenard/python-pre-commit:latest stage: tests script: - pre-commit run --all-files build:debian12: image: docker.io/brenard/debian-python-deb:debian12 stage: build rules: - if: $CI_COMMIT_TAG before_script: - ./build.sh --install-build-deps-only -x script: - > if [ "$GITLAB_CI" == "true" ]; then ./build.sh -x --purge-sources-directory else ./build.sh -x fi artifacts: paths: - dist/* build:debian11: image: docker.io/brenard/debian-python-deb:debian11 stage: build rules: - if: $CI_COMMIT_TAG before_script: - ./build.sh --install-build-deps-only -x script: - > if [ "$GITLAB_CI" == "true" ]; then ./build.sh -x --purge-sources-directory else ./build.sh -x fi artifacts: paths: - dist/* build:debian10: image: docker.io/brenard/debian-python-deb:debian10 stage: build rules: - if: $CI_COMMIT_TAG before_script: - ./build.sh --install-build-deps-only -x script: - > if [ "$GITLAB_CI" == "true" ]; then ./build.sh -x --purge-sources-directory else ./build.sh -x fi artifacts: paths: - dist/* upload: stage: upload image: name: docker.io/alpine needs: - "build:debian12" - "build:debian11" - "build:debian10" rules: - if: $CI_COMMIT_TAG before_script: - apk update - apk add bash curl script: - bash -x .gitlab/upload.sh artifacts: paths: - dist/release-notes.md - dist/release-files.txt release: stage: release image: docker.io/alpine needs: - "upload" rules: - if: $CI_COMMIT_TAG before_script: - apk update - apk add bash curl jo - | curl --location \ --output /usr/local/bin/release-cli \ "https://gitlab.com/api/v4/projects/gitlab-org%2Frelease-cli/packages/generic/release-cli/latest/release-cli-linux-amd64" - chmod +x /usr/local/bin/release-cli script: - bash -x .gitlab/release.sh publish:debian12: image: name: docker.io/brenard/aptly-publish:latest entrypoint: ["/bin/sh", "-c"] stage: publish script: - echo "Publish packages for Debian Bookworm (12) on Easter-eggs APT repository..." - aptly-publish needs: - "build:debian12" - job: "release" artifacts: false rules: - if: $CI_COMMIT_TAG publish:debian11: image: name: docker.io/brenard/aptly-publish:latest entrypoint: ["/bin/sh", "-c"] stage: publish script: - echo "Publish packages for Debian Bullseye (11) on Easter-eggs APT repository..." - aptly-publish needs: - "build:debian11" - job: "release" artifacts: false rules: - if: $CI_COMMIT_TAG publish:debian10: image: name: docker.io/brenard/aptly-publish:latest entrypoint: ["/bin/sh", "-c"] stage: publish script: - echo "Publish packages for Debian Buster (10) on Easter-eggs APT repository..." - aptly-publish needs: - "build:debian10" - job: "release" artifacts: false rules: - if: $CI_COMMIT_TAG