diff --git a/.gitlab/release.yml b/.gitlab/release.yml index 6b812096..1b04c2e7 100644 --- a/.gitlab/release.yml +++ b/.gitlab/release.yml @@ -5,14 +5,19 @@ release: image: registry.gitlab.com/gitlab-org/release-cli:latest rules: - if: $CI_COMMIT_TAG + needs: + - job: win-prod-build + artifacts: true script: + - echo "Build Job $JOB_ID" - echo "Running release job for tag $CI_COMMIT_TAG" release: - tag_name: $CI_COMMIT_TAG name: Crafty $CI_COMMIT_TAG + tag_name: $CI_COMMIT_TAG description: ./CHANGELOG.md + ref: $CI_COMMIT_TAG assets: links: - name: Windows Package - url: "${CI_PROJECT_URL}/-/jobs/`cat CI_JOB_ID.txt`/artifacts/download" + url: "$CI_PROJECT_URL/-/jobs/$JOB_ID/artifacts/download" link_type: package diff --git a/.gitlab/windows-build.yml b/.gitlab/windows-build.yml index 277710f0..0269c0c0 100644 --- a/.gitlab/windows-build.yml +++ b/.gitlab/windows-build.yml @@ -49,12 +49,10 @@ win-prod-build: paths: - .venv/ rules: - - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" - if: $CI_COMMIT_TAG environment: name: production script: - - echo "${CI_JOB_ID}" > CI_JOB_ID.txt - | $ErrorActionPreference = "Stop" py -m venv .venv @@ -73,6 +71,8 @@ win-prod-build: --collect-all tzdata --collect-all pytz --collect-all six + after_script: + - echo "JOB_ID=$CI_JOB_ID" >> job.env # Download latest: # | https://gitlab.com/crafty-controller/crafty-4/-/jobs/artifacts/master/download?job=win-prod-build @@ -81,7 +81,8 @@ win-prod-build: paths: - app\ - .\crafty_commander.exe - - CI_JOB_ID.txt expire_in: never exclude: - app\classes\**\* + reports: + dotenv: job.env