1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 11:32:42 +01:00
ScreenPlay/.gitlab/ci/build_release_jobs.yml
2023-08-20 15:30:09 +02:00

78 lines
3.2 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

steam_linux:
stage: release_build
extends:
- .base_linux_build
script:
- python3 Tools/build.py --type=release --steam --deploy-version --use-aqt --installer
rules:
- if: "$CI_COMMIT_TAG"
artifacts:
paths:
- build-x64-linux-release/ScreenPlay-$CI_COMMIT_TAG-x64-linux-release.zip
- build-x64-linux-release/ScreenPlay-$CI_COMMIT_TAG-x64-linux-release.zip.sha256.txt
steam_windows:
stage: release_build
extends:
- .base_windows_build
script:
- python Tools/build.py --type=release --steam --use-aqt --deploy-version
rules:
- if: "$CI_COMMIT_TAG"
artifacts:
paths:
- build-x64-windows-release/ScreenPlay-$CI_COMMIT_TAG-x64-windows-release.zip
- build-x64-windows-release/ScreenPlay-$CI_COMMIT_TAG-x64-windows-release.zip.sha256.txt
steam_osx:
stage: release_build
extends:
- .base_osx_build
script:
- python3 Tools/build.py --type=release --steam --use-aqt --deploy-version --sign_osx
rules:
- if: "$CI_COMMIT_TAG"
artifacts:
paths:
- build-64-osx-universal-release/ScreenPlay-$CI_COMMIT_TAG-64-osx-universal-release.zip
- build-64-osx-universal-release/ScreenPlay-$CI_COMMIT_TAG-64-osx-universal-release.zip.sha256.txt
release_job:
stage: release
image: python:3.11
dependencies:
- steam_linux
- steam_windows
- steam_osx
rules:
- if: "$CI_COMMIT_TAG" # Run this job when a tag is created
when: on_success # Only when all previous jobs succeed
script:
# 1. Combining sha256 files into a SHA512-SUMS.txt
- echo "Combining sha256 files into a SHA512-SUMS.txt"
- python3 Tools/create_sha512.py
# 2. Connect and handle the folder
- echo "Managing remote folder"
- apt-get update && apt-get install -y sshpass ssh
- sshpass -p $GETSP_PASSWORD ssh $GETSP_USERNAME@91.204.46.10 "rm -rf /getsp.de/$CI_COMMIT_TAG; mkdir /getsp.de/$CI_COMMIT_TAG;"
# 3. Upload files to the remote folder
- echo "Uploading files"
- sshpass -p $GETSP_PASSWORD scp build-x64-linux-release/ScreenPlay-$CI_COMMIT_TAG-x64-linux-release.zip $GETSP_USERNAME@91.204.46.10:/getsp.de/$CI_COMMIT_TAG/
- sshpass -p $GETSP_PASSWORD scp build-x64-windows-release/ScreenPlay-$CI_COMMIT_TAG-x64-windows-release.zip $GETSP_USERNAME@91.204.46.10:/getsp.de/$CI_COMMIT_TAG/
- sshpass -p $GETSP_PASSWORD scp build-64-osx-universal-release/ScreenPlay-$CI_COMMIT_TAG-64-osx-universal-release.zip $GETSP_USERNAME@91.204.46.10:/getsp.de/$CI_COMMIT_TAG/
- sshpass -p $GETSP_PASSWORD scp SHA512-SUMS.txt $GETSP_USERNAME@91.204.46.10:/getsp.de/$CI_COMMIT_TAG/
release:
tag_name: $CI_COMMIT_TAG
name: "ScreenPlay $CI_COMMIT_TAG Released!"
description: "🎉 A Wild ScreenPlay Release Appeared!"
assets:
links:
- name: 🐧 Linux x64 build
url: "https://getsp.de/$CI_COMMIT_TAG/ScreenPlay-$CI_COMMIT_TAG-x64-linux-release.zip"
- name: 🪟 Windows x64 build
url: "https://getsp.de/$CI_COMMIT_TAG/ScreenPlay-$CI_COMMIT_TAG-x64-windows-release.zip"
- name: 🍏 OSX universal build
url: "https://getsp.de/$CI_COMMIT_TAG/ScreenPlay-$CI_COMMIT_TAG-64-osx-universal-release.zip"
- name: SHA512-SUMS.txt
url: "https://getsp.de/$CI_COMMIT_TAG/SHA512-SUMS.txt"