Update .gitlab-ci.yml file

This commit is contained in:
Jason Secula
2026-02-13 14:29:22 +01:00
parent 23a617ef62
commit 73f21ac6cd

View File

@@ -1,15 +1,18 @@
build-deploy: # This job runs in the build stage, which runs first.
image: python:latest
rules:
- if: $CI_COMMIT_TAG
variables:
TWINE_USERNAME: gitlab-ci-token
TWINE_PASSWORD: $CI_JOB_TOKEN
image: python:latest
build: # This job runs in the build stage, which runs first.
script:
- pip install build twine
- mkdir build/src/AirwatchAPI/
- mv AirwatchAPI.py build/src/AirwatchAPI/
- cd build/
- python -m build
deploy:
variables:
TWINE_USERNAME: gitlab-ci-token
TWINE_PASSWORD: $CI_JOB_TOKEN
script:
- python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
rules:
- if: $CI_COMMIT_TAG