From 6df2b45d7da05a21b5a34f4698735cd2fd22e600 Mon Sep 17 00:00:00 2001 From: paugier Date: Sun, 27 Oct 2024 13:51:41 +0100 Subject: [PATCH] Try CI with Heptapod --- .gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..73be5f8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,46 @@ +stages: + - test + - build + - release + +test-run: + image: bookworm-slim + stage: test + script: + - wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" + - bash Miniforge3-$(uname)-$(uname -m).sh -b + - ls ~/miniconda + - ~/miniconda/bin/conda init bash + - . ~/.bashrc + - conda --version + +build-package: + image: python:3.12 + stage: build + before_script: + - python -m pip install build + script: + - python -m build + needs: [] + artifacts: + when: always + paths: + - dist + expire_in: 24 hrs + +# manually set TWINE_PASSWORD in web interface to your PyPI API token +release-package: + image: python:3.12 + stage: release + needs: [ "build-package" ] + # rules: + # - if: '$CI_MERGE_REQUEST_ID' + # when: never + # - if: '$CI_COMMIT_TAG' + # when: on_success + variables: + TWINE_USERNAME: __token__ + before_script: + - pip install twine -U + # script: + # - twine upload dist/*