marl-factory-grid/.gitlab-ci.yml
2023-11-11 16:04:55 +01:00

22 lines
643 B
YAML

stages: # List of stages for jobs, and their order of execution
- build
build-job: # This job runs in the build stage, which runs first.
stage: build
rules:
- if: $CI_COMMIT_REF_NAME == "pypi" #when commit pushed in this branch it will trigger this job
variables:
TWINE_USERNAME: $USER_NAME
TWINE_PASSWORD: $API_KEY
image: python:slim
script:
- echo "Compiling the code..."
- pip install twine --upgrade
- python setup.py sdist
- echo "Compile complete."
- twine upload dist/* --username $USER_NAME --password $API_KEY --repository marl-factory-grid
- echo "Upload complete."