1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 02:52:29 +01:00
ScreenPlay/.gitlab/ci/build_release_jobs.yml
2023-08-23 17:47:16 +02:00

79 lines
3.5 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
- python3 Tools/create_sha512.py
# 2. Install dependencies and handle the folder
- apt update
- apt install -y sshpass ssh curl
- curl --location --output /usr/local/bin/release-cli "https://gitlab.com/api/v4/projects/gitlab-org%2Frelease-cli/packages/generic/release-cli/latest/release-cli-linux-amd64"
- chmod +x /usr/local/bin/release-cli
- ssh-keyscan 91.204.46.10 >> ~/.ssh/known_hosts
- sshpass -p $GETSP_PASSWORD ssh $GETSP_USERNAME@91.204.46.10 "rm -rf /getsp.de/httpdocs/releases/$CI_COMMIT_TAG; mkdir /getsp.de/httpdocs/releases/$CI_COMMIT_TAG;"
# 3. Upload files to the remote folder
- 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/httpdocs/releases/$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/httpdocs/releases/$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/httpdocs/releases/$CI_COMMIT_TAG/
- sshpass -p $GETSP_PASSWORD scp SHA512-SUMS.txt $GETSP_USERNAME@91.204.46.10:/getsp.de/httpdocs/releases/$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/releases/$CI_COMMIT_TAG/ScreenPlay-$CI_COMMIT_TAG-x64-linux-release.zip"
- name: 🪟 Windows x64 build
url: "https://getsp.de/releases/$CI_COMMIT_TAG/ScreenPlay-$CI_COMMIT_TAG-x64-windows-release.zip"
- name: 🍏 OSX universal build
url: "https://getsp.de/releases/$CI_COMMIT_TAG/ScreenPlay-$CI_COMMIT_TAG-64-osx-universal-release.zip"
- name: SHA512-SUMS.txt
url: "https://getsp.de/releases/$CI_COMMIT_TAG/SHA512-SUMS.txt"