Loading templates/pypi-upload.yml→templates/python.yml +30 −8 Original line number Diff line number Diff line --- include: - project: shore/ci-templates file: templates/gitlab-release.yml .build-wheel: tags: [ns4.shore.co.il] stage: build image: python:slim script: - python setup.py check --verbose --metadata --restructuredtext --strict - python setup.py bdist_wheel artifacts: paths: - dist/*.whl .install-wheel: tags: [ns4.shore.co.il] stage: test image: python:slim variables: XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" script: - pip install dist/*.whl needs: - job: build-wheel artifacts: true cache: paths: - .cache/ pypi-upload: stage: deploy tags: [ns4.shore.co.il] stage: deploy image: python:slim before_script: - pip install twine - mv "$pypirc" $HOME/.pypirc script: - python setup.py bdist_wheel - twine check dist/* - twine upload dist/* variables: XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" Loading @@ -20,6 +42,6 @@ pypi-upload: - .cache/ rules: - if: $CI_COMMIT_TAG artifacts: paths: - dist/*.whl needs: - job: build-wheel artifacts: true Loading
templates/pypi-upload.yml→templates/python.yml +30 −8 Original line number Diff line number Diff line --- include: - project: shore/ci-templates file: templates/gitlab-release.yml .build-wheel: tags: [ns4.shore.co.il] stage: build image: python:slim script: - python setup.py check --verbose --metadata --restructuredtext --strict - python setup.py bdist_wheel artifacts: paths: - dist/*.whl .install-wheel: tags: [ns4.shore.co.il] stage: test image: python:slim variables: XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" script: - pip install dist/*.whl needs: - job: build-wheel artifacts: true cache: paths: - .cache/ pypi-upload: stage: deploy tags: [ns4.shore.co.il] stage: deploy image: python:slim before_script: - pip install twine - mv "$pypirc" $HOME/.pypirc script: - python setup.py bdist_wheel - twine check dist/* - twine upload dist/* variables: XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" Loading @@ -20,6 +42,6 @@ pypi-upload: - .cache/ rules: - if: $CI_COMMIT_TAG artifacts: paths: - dist/*.whl needs: - job: build-wheel artifacts: true