2024-07-21 20:39:45 -04:00
|
|
|
stages:
|
2024-10-16 19:44:14 -04:00
|
|
|
- legal
|
2024-07-21 20:39:45 -04:00
|
|
|
- build
|
2024-07-21 22:13:54 -04:00
|
|
|
- deploy
|
2024-07-21 20:39:45 -04:00
|
|
|
|
2024-10-16 19:44:14 -04:00
|
|
|
check_signoff:
|
|
|
|
stage: legal
|
2024-10-16 20:19:01 -04:00
|
|
|
image: cr.acidiclight.dev/docker-images/tinygit/tinygit:latest
|
2024-10-16 20:02:54 -04:00
|
|
|
script: |
|
2024-10-16 19:46:28 -04:00
|
|
|
COMMITTER_EMAIL=$(git log -1 --pretty=format:'%ae')
|
2024-10-16 21:05:03 -04:00
|
|
|
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)')
|
2024-10-16 19:57:35 -04:00
|
|
|
if [ -z "$MAINTAINER_CHECK" ]; then echo $CI_COMMIT_MESSAGE | grep "Signed-off-by: $CI_COMMIT_AUTHOR"; fi
|
2024-07-21 21:53:50 -04:00
|
|
|
|
2024-07-21 22:21:06 -04:00
|
|
|
# Makes sure the base game compiles.
|
2024-07-21 21:53:50 -04:00
|
|
|
build_base:
|
|
|
|
stage: build
|
2024-10-16 17:56:37 -04:00
|
|
|
image: cr.acidiclight.dev/docker-images/monogame-linux-build/dotnet-mgcb:latest
|
2024-10-20 20:22:23 -04:00
|
|
|
before_script:
|
2024-08-21 21:29:42 -04:00
|
|
|
- if (dotnet nuget list source | grep gitlab); then dotnet nuget remove source gitlab; fi
|
|
|
|
- dotnet nuget add source -n gitlab https://gitlab.acidiclight.dev/api/v4/projects/13/packages/nuget/index.json
|
2024-10-20 20:22:23 -04:00
|
|
|
- mkdir bin
|
|
|
|
script:
|
2024-08-21 21:23:31 -04:00
|
|
|
- dotnet build -c release src
|
2024-10-20 20:22:23 -04:00
|
|
|
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
|
2024-07-21 22:13:54 -04:00
|
|
|
|
2024-10-22 18:46:53 -04:00
|
|
|
steam:
|
|
|
|
stage: deploy
|
2024-10-22 20:02:30 -04:00
|
|
|
variables:
|
|
|
|
SOCIALLY_DISTANT_OS: "$CI_PROJECT_URL"
|
|
|
|
SOCIALLY_DISTANT_SHA: "$CI_COMMIT_SHA"
|
|
|
|
BUILD_TAG: "$CI_COMMIT_TAG"
|
|
|
|
BUILD_BRANCH: "$CI_COMMIT_REF_NAME"
|
2024-10-22 20:22:36 -04:00
|
|
|
BUILD_IDENTIFIER: "$CI_COMMIT_SHORT_SHA"
|
2024-10-22 18:46:53 -04:00
|
|
|
trigger:
|
|
|
|
project: sociallydistant/career-build-pipeline
|
2024-10-22 18:53:32 -04:00
|
|
|
branch: main
|
2024-10-22 18:46:53 -04:00
|
|
|
strategy: depend
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- devel
|
|
|
|
|
2024-10-20 20:22:23 -04:00
|
|
|
update_online_manual:
|
2024-10-18 23:24:53 -04:00
|
|
|
stage: deploy
|
|
|
|
image: cr.acidiclight.dev/docker-images/monogame-linux-build/dotnet-mgcb:latest
|
2024-10-20 20:22:23 -04:00
|
|
|
before_script:
|
2024-10-18 23:24:53 -04:00
|
|
|
- if (dotnet nuget list source | grep gitlab); then dotnet nuget remove source gitlab; fi
|
|
|
|
- dotnet nuget add source -n gitlab https://gitlab.acidiclight.dev/api/v4/projects/13/packages/nuget/index.json
|
2024-10-18 23:27:48 -04:00
|
|
|
- dotnet tool update -g docfx
|
2024-10-20 20:22:23 -04:00
|
|
|
script:
|
2024-10-18 23:35:02 -04:00
|
|
|
- export PATH="$PATH:$HOME/.dotnet/tools"
|
2024-10-18 23:24:53 -04:00
|
|
|
- docfx
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
only:
|
|
|
|
- master
|