mirror of
https://gitlab.acidiclight.dev/sociallydistant/sociallydistant.git
synced 2025-01-22 09:31:47 -05:00
87 lines
3.2 KiB
YAML
Executable file
87 lines
3.2 KiB
YAML
Executable file
stages:
|
|
- legal
|
|
- build
|
|
- deploy
|
|
|
|
check_signoff:
|
|
stage: legal
|
|
image: cr.acidiclight.dev/docker-images/tinygit/tinygit:latest
|
|
script: |
|
|
COMMITTER_EMAIL=$(git log -1 --pretty=format:'%ae')
|
|
MAINTAINER_CHECK=$(curl -s --header "PRIVATE-TOKEN: $CI_PRIVILEGED_ACCESS_TOKEN" "https://gitlab.acidiclight.dev/api/v4/projects/$CI_PROJECT_ID/members/all" | jq --arg EMAIL "$COMMITTER_EMAIL" '.[] | select(.email == $EMAIL and .access_level >= 40)')
|
|
if [ -z "$MAINTAINER_CHECK" ]; then echo $CI_COMMIT_MESSAGE | grep "Signed-off-by: $CI_COMMIT_AUTHOR"; fi
|
|
|
|
# Makes sure the base game compiles.
|
|
build_os_linux:
|
|
stage: build
|
|
image: cr.acidiclight.dev/docker-images/monogame-linux-build/dotnet-mgcb:latest
|
|
before_script:
|
|
- mkdir bin
|
|
script:
|
|
- dotnet build -c release src
|
|
after_script:
|
|
- dotnet publish src/SociallyDistant -r linux-x64 -c release --self-contained -o bin/linux-x64;
|
|
artifacts:
|
|
name: "socially-distant-linux-amd64-$CI_COMMIT_REF_SLUG"
|
|
paths:
|
|
- bin/linux-x64
|
|
|
|
build_os_windows:
|
|
stage: build
|
|
image: mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2022
|
|
tags:
|
|
- windows
|
|
before_script:
|
|
- echo "Download Visual C++ Redistributable installers"
|
|
- Invoke-WebRequest -Uri "https://aka.ms/vs/16/release/vc_redist.x64.exe" -OutFile "C:\vc_redist2010.exe"
|
|
- Invoke-WebRequest -Uri "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe" -OutFile "C:\vc_redist2012.exe"
|
|
- Invoke-WebRequest -Uri "https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe" -OutFile "C:\vc_redist2013.exe"
|
|
- Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "C:\vc_redist2015-2022.exe"
|
|
- echo "Install VC++ Redistributables"
|
|
- Start-Process -FilePath "C:\vc_redist2010.exe" -ArgumentList "/install /quiet /norestart" -Wait
|
|
- Start-Process -FilePath "C:\vc_redist2012.exe" -ArgumentList "/install /quiet /norestart" -Wait
|
|
- Start-Process -FilePath "C:\vc_redist2013.exe" -ArgumentList "/install /quiet /norestart" -Wait
|
|
- Start-Process -FilePath "C:\vc_redist2015-2022.exe" -ArgumentList "/install /quiet /norestart" -Wait
|
|
script:
|
|
- mkdir bin
|
|
- echo "Starting the Windows build..."
|
|
- dotnet publish -c release -r win-x64 --self-contained -o bin/win-x64 src/SociallyDistant
|
|
artifacts:
|
|
name: "socially-distant-windows-x64-$CI_COMMIT_REF_SLUG"
|
|
paths:
|
|
- bin/win-x64
|
|
|
|
steam:
|
|
stage: deploy
|
|
variables:
|
|
SOCIALLY_DISTANT_OS: "$CI_PROJECT_URL"
|
|
SOCIALLY_DISTANT_SHA: "$CI_COMMIT_SHA"
|
|
BUILD_TAG: "$CI_COMMIT_TAG"
|
|
BUILD_BRANCH: "$CI_COMMIT_REF_NAME"
|
|
BUILD_IDENTIFIER: "$CI_COMMIT_SHORT_SHA"
|
|
trigger:
|
|
project: sociallydistant/career-build-pipeline
|
|
branch: main
|
|
strategy: depend
|
|
only:
|
|
- master
|
|
- devel
|
|
- tags
|
|
except:
|
|
- merge_requests
|
|
|
|
update_online_manual:
|
|
stage: deploy
|
|
image: cr.acidiclight.dev/docker-images/monogame-linux-build/dotnet-mgcb:latest
|
|
before_script:
|
|
- dotnet tool update -g docfx
|
|
script:
|
|
- export PATH="$PATH:$HOME/.dotnet/tools"
|
|
- docfx
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- master
|
|
except:
|
|
- merge_requests
|