Update .gitlab-ci.yml file
This commit is contained in:
@@ -1,23 +1,16 @@
|
|||||||
image: python:latest
|
image: python:latest
|
||||||
|
|
||||||
stages:
|
variables:
|
||||||
- build
|
TWINE_USERNAME: gitlab-ci-token
|
||||||
- deploy
|
TWINE_PASSWORD: $CI_JOB_TOKEN
|
||||||
|
|
||||||
build: # This job runs in the build stage, which runs first.
|
build: # This job runs in the build stage, which runs first.
|
||||||
stage: build
|
|
||||||
script:
|
script:
|
||||||
- pip install build twine
|
- pip install build twine
|
||||||
- mkdir build/src/AirwatchAPI/
|
- mkdir build/src/AirwatchAPI/
|
||||||
- mv AirwatchAPI.py build/src/AirwatchAPI/
|
- mv AirwatchAPI.py build/src/AirwatchAPI/
|
||||||
- cd build/
|
- cd build/
|
||||||
- python -m build
|
- python -m build
|
||||||
deploy:
|
|
||||||
stage: 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/*
|
- python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_TAG
|
- if: $CI_COMMIT_TAG
|
||||||
|
|||||||
Reference in New Issue
Block a user