From 1f82ef278583ba82d076a9644a42fb056332c48c Mon Sep 17 00:00:00 2001 From: Faerbit Date: Tue, 27 Sep 2022 18:50:35 +0200 Subject: [PATCH] [ci] upload to package registry --- .gitlab-ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 368fc77..75da92e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,13 +22,21 @@ package_linux: - pipenv sync --dev script: - VERSION=$(pipenv run python -m setuptools_scm) - - echo $VERSION + - echo $VERSION | tee version.txt - pipenv run python -m build -w - - pipenv run pyinstaller --onefile --strip --name fime_${VERSION} src/fime/main.py + - pipenv run pyinstaller --onefile --strip --name fime_linux_${VERSION} src/fime/main.py artifacts: paths: + - version.txt - dist/*.whl - - dist/fime_* + - dist/fime_linux_* + +upload: + image: curlimages/curl:latest + stage: deploy + script: + - VERSION=$(cat version.txt) + - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file dist/fime_linux_${VERSION} "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/fime/${VERSION}/fime_linux_${VERSION}"' release_job: stage: release