2022-09-21 22:01:09 +00:00
|
|
|
image: python:3.10
|
2022-09-21 21:53:45 +00:00
|
|
|
|
|
|
|
variables:
|
|
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
2022-09-21 21:58:23 +00:00
|
|
|
PIPENV_VENV_IN_PROJECT: 1
|
2022-09-21 21:53:45 +00:00
|
|
|
|
2022-09-27 16:29:07 +00:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
- release
|
|
|
|
|
2022-09-21 21:53:45 +00:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- .cache/pip
|
2022-09-21 21:58:23 +00:00
|
|
|
- .venv/
|
2022-09-21 21:53:45 +00:00
|
|
|
|
2022-09-27 16:29:07 +00:00
|
|
|
package_linux:
|
2022-09-21 21:53:45 +00:00
|
|
|
stage: build
|
2022-09-27 16:29:07 +00:00
|
|
|
before_script:
|
2022-09-21 21:53:45 +00:00
|
|
|
- python --version
|
2022-09-27 16:29:07 +00:00
|
|
|
- pip install pipenv
|
2022-09-21 21:56:18 +00:00
|
|
|
- pipenv sync --dev
|
2022-09-27 16:29:07 +00:00
|
|
|
script:
|
2022-09-27 16:34:15 +00:00
|
|
|
- VERSION=$(pipenv run python -m setuptools_scm)
|
2022-09-27 16:37:41 +00:00
|
|
|
- echo $VERSION
|
2022-09-27 16:34:15 +00:00
|
|
|
- pipenv run python -m build -w
|
2022-09-27 16:37:41 +00:00
|
|
|
- pipenv run pyinstaller --onefile --strip --name fime_${VERSION} src/fime/main.py
|
2022-09-21 21:53:45 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- dist/*.whl
|
2022-09-27 16:29:07 +00:00
|
|
|
- dist/fime_*
|
2022-09-21 22:10:31 +00:00
|
|
|
|
|
|
|
release_job:
|
2022-09-27 16:29:07 +00:00
|
|
|
stage: release
|
2022-09-21 22:10:31 +00:00
|
|
|
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.'
|