Optimize how many times we build the game on a new container

This commit is contained in:
Ritchie Frodomar 2024-10-20 20:22:23 -04:00
parent 7785481efd
commit d4d2fa9575
No known key found for this signature in database
GPG key ID: 47384A02C174B15F

View file

@ -15,18 +15,27 @@ check_signoff:
build_base: build_base:
stage: build stage: build
image: cr.acidiclight.dev/docker-images/monogame-linux-build/dotnet-mgcb:latest image: cr.acidiclight.dev/docker-images/monogame-linux-build/dotnet-mgcb:latest
script: before_script:
- if (dotnet nuget list source | grep gitlab); then dotnet nuget remove source gitlab; fi - 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 - dotnet nuget add source -n gitlab https://gitlab.acidiclight.dev/api/v4/projects/13/packages/nuget/index.json
- mkdir bin
script:
- dotnet build -c release src - 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
pages: update_online_manual:
stage: deploy stage: deploy
image: cr.acidiclight.dev/docker-images/monogame-linux-build/dotnet-mgcb:latest image: cr.acidiclight.dev/docker-images/monogame-linux-build/dotnet-mgcb:latest
script: before_script:
- if (dotnet nuget list source | grep gitlab); then dotnet nuget remove source gitlab; fi - 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 - dotnet nuget add source -n gitlab https://gitlab.acidiclight.dev/api/v4/projects/13/packages/nuget/index.json
- dotnet tool update -g docfx - dotnet tool update -g docfx
script:
- export PATH="$PATH:$HOME/.dotnet/tools" - export PATH="$PATH:$HOME/.dotnet/tools"
- docfx - docfx
artifacts: artifacts:
@ -34,17 +43,3 @@ pages:
- public - public
only: only:
- master - master
publish_linux:
stage: deploy
image: cr.acidiclight.dev/docker-images/monogame-linux-build/dotnet-mgcb:latest
script:
- mkdir bin;
- 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
- dotnet publish src/SociallyDistant -r linux-x64 -c release --self-contained -o bin/linux-x64;
artifacts:
name: socially-distant-linux-amd64-release
paths:
- bin/linux-x64