fime/.gitlab-ci.yml
2022-09-27 18:37:41 +02:00

44 lines
890 B
YAML

image: python:3.10
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PIPENV_VENV_IN_PROJECT: 1
stages:
- build
- deploy
- release
cache:
paths:
- .cache/pip
- .venv/
package_linux:
stage: build
before_script:
- python --version
- pip install pipenv
- pipenv sync --dev
script:
- VERSION=$(pipenv run python -m setuptools_scm)
- echo $VERSION
- pipenv run python -m build -w
- pipenv run pyinstaller --onefile --strip --name fime_${VERSION} src/fime/main.py
artifacts:
paths:
- dist/*.whl
- dist/fime_*
release_job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Running the release job."
release:
tag_name: $CI_COMMIT_TAG
name: 'Release $CI_COMMIT_TAG'
description: 'Release created using the release-cli.'