Skip to content

Commit

Permalink
setup pypi release on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniolrm committed Jul 4, 2024
1 parent 75b777c commit 8994d08
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,24 @@ pages:
paths:
- public

run nox:
variables:
GIT_STRATEGY: clone
CONDA_PKGS_DIRS: micromamba/pkgs
parallel:
matrix:
- NOXSESSION:
- "tests(minimal)"
- "tests(mid)"
- "tests(latest)"
publish to test pypi:
needs:
- run tests
- run docs
rules:
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+.*\+test$/' # vX.Y.Z.post1+test
script:
- micromamba install -c conda-forge -y nox mamba
- nox -s $NOXSESSION
cache:
key: "$CI_JOB_NAME"
paths:
- micromamba
- micromamba install -c conda-forge -y hatch hatch-vcs
- hatch build
- hatch publish -u __token__ -a $PYPI_TEST_TOKEN -r test

publish to pypi:
needs:
- run tests
- run docs
rules:
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+[^+]*$/' # No +test
script:
- micromamba install -c conda-forge -y hatch hatch-vcs
- hatch build
- hatch publish -u __token__ -a $PYPI_TOKEN

0 comments on commit 8994d08

Please sign in to comment.