Skip to content
Snippets Groups Projects
Commit d2a61969 authored by Viacheslav Ostroukh's avatar Viacheslav Ostroukh
Browse files

add .gitlab-ci.yml

parent 71281914
No related branches found
Tags v0.1.0rc1
No related merge requests found
Checking pipeline status
include:
- project: opensource/ci
ref: main
file: python/common.yml
workflow:
rules:
- if: $CI_COMMIT_TAG =~ /^v[0-9]+.[0-9]+.[0-9]+(rc[0-9]+)?$/
- when: never
stages:
- "package"
- "test-package"
- "test-deploy"
- "deploy"
Build:
stage: package
image: quay.io/pypa/manylinux_2_28_x86_64:latest
extends:
- .package-cache
variables:
MANYLINUX_PYTHON_VERSION: "cp312-cp312"
CONDA_SUBDIR: "linux-64"
rules:
- when: on_success
script:
- '"/opt/python/${MANYLINUX_PYTHON_VERSION}/bin/python" -m build --wheel --outdir dist'
artifacts:
paths:
- "dist"
Twine check:
stage: test-package
image: "$IMAGE_MICROMAMBA"
needs:
- job: Build
artifacts: true
before_script:
- micromamba --yes install twine
script:
- twine check dist/*
rules:
- when: on_success
Release (test PyPI):
stage: test-deploy
before_script:
- micromamba --yes install twine
needs:
- job: Build
artifacts: true
- job: Twine check
artifacts: false
script:
- twine upload --disable-progress-bar dist/*
variables:
TWINE_USERNAME: __token__
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
TWINE_PASSWORD: "${PYPI_API_TOKEN_TEST}"
Release:
stage: deploy
before_script:
- micromamba --yes install twine
needs:
- job: Release (test PyPI)
artifacts: false
script:
- twine upload --disable-progress-bar dist/*
variables:
TWINE_USERNAME: __token__
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
TWINE_PASSWORD: "${PYPI_API_TOKEN_PROD}"
allow_failure: false
rules:
- if: $CI_COMMIT_TAG =~ /^v[0-9]+.[0-9]+.[0-9]+$/
when: on_success
- when: manual
allow_failure: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment