1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00

Add pre-release flags

This commit is contained in:
Elias Steurer 2023-08-18 17:56:50 +02:00
parent 52b4732360
commit b96990accb

View File

@ -39,26 +39,26 @@ steam_osx:
release_job: release_job:
stage: release stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: "$CI_COMMIT_TAG" # Run this job when a tag is created
when: on_success # Only when all previous jobs succeed
script: script:
- echo "Creating a GitLab release using release-cli." - |
artifacts: is_pre_release=false
paths: if [[ "$CI_COMMIT_TAG" =~ -dev[0-9]+$ || "$CI_COMMIT_TAG" =~ -beta[0-9]+$ || "$CI_COMMIT_TAG" =~ -rc[0-9]+$ ]]; then
- build-x64-linux-release/bin is_pre_release=true
- build-x64-windows-release/ScreenPlay-$CI_COMMIT_TAG-x64-windows-release.zip fi
- build-64-osx-universal-release/bin/ScreenPlay.app if $is_pre_release; then
release: release_name="ScreenPlay Pre-release $CI_COMMIT_TAG"
tag_name: $CI_COMMIT_TAG description="🎉 A Wild ScreenPlay Pre-release Appeared!"
name: "ScreenPlay $CI_COMMIT_TAG Released!" pre_release_flag="--pre-release"
description: "🎉 A Wild ScreenPlay Release Appeared!" else
expire_in: never release_name="ScreenPlay Release $CI_COMMIT_TAG"
assets: description="🎉 A Wild ScreenPlay Release Appeared!"
links: pre_release_flag=""
- name: 🐧 Linux x64 build fi
url: "$CI_PIPELINE_URL/artifacts/file/build-x64-linux-release/bin" release-cli create --name "$release_name" \
- name: 🪟 Windows x64 build --description "$description" \
url: "$CI_PIPELINE_URL/artifacts/file/build-x64-windows-release/ScreenPlay-$CI_COMMIT_TAG-x64-windows-release.zip" --tag-name $CI_COMMIT_TAG \
- name: 🍏 OSX universal build --ref $CI_COMMIT_REF_NAME \
url: "$CI_PIPELINE_URL/artifacts/file/build-64-osx-universal-release/bin/ScreenPlay.app" $pre_release_flag \
--assets-link '[{"name":"🐧 Linux x64 build","url":"$CI_PIPELINE_URL/artifacts/file/build-x64-linux-release/bin"},{"name":"🪟 Windows x64 build","url":"$CI_PIPELINE_URL/artifacts/file/build-x64-windows-release/ScreenPlay-$CI_COMMIT_TAG-x64-windows-release.zip"},{"name":"🍏 OSX universal build","url":"$CI_PIPELINE_URL/artifacts/file/build-64-osx-universal-release/bin/ScreenPlay.app"}]'
rules:
- if: "$CI_COMMIT_TAG"