fime/.gitlab-ci.yml

43 lines
870 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)
- pipenv run python -m build -w
- pipenv run pyinstaller --onefile --strip --name fime_${VERSION} src/main/fime.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.'