Only deploy on merges to master
This commit is contained in:
@@ -1,7 +1,28 @@
|
||||
image: python:latest
|
||||
|
||||
run:
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
artifacts:
|
||||
paths:
|
||||
- ./dist
|
||||
script:
|
||||
- source init_env.sh
|
||||
- python -m build
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- echo "Haha no tests yet"
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
only:
|
||||
- master
|
||||
- merge_requests
|
||||
script:
|
||||
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${PACKAGE_PROJECT_ID}/packages/pypi dist/*
|
||||
|
||||
Reference in New Issue
Block a user