Update .gitlab-ci.yml
This commit is contained in:
parent
00c0274950
commit
c4ba9949b3
1 changed files with 40 additions and 0 deletions
40
.gitlab-ci.yml
Normal file
40
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
stages:
|
||||
- build
|
||||
- publish
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image: mcr.microsoft.com/dotnet/sdk:5.0
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- echo "Starting building $(pwd) for $CI_COMMIT_BRANCH ($CI_PROJECT_NAME)"
|
||||
- echo -e "\e[1;32mCommit $CI_COMMIT_SHORT_SHA, $CI_COMMIT_DESCRIPTION in $CI_COMMIT_BRANCH, by $CI_COMMIT_AUTHOR"
|
||||
- dotnet restore --interactive
|
||||
- dotnet build --configuration Release
|
||||
- echo -e "\e[1;32mDone."
|
||||
tags:
|
||||
- docker
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
image: mcr.microsoft.com/dotnet/sdk:5.0
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- dotnet restore --interactive
|
||||
- dotnet publish --configuration Release -o publish -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained false -r linux-x64 -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
- mv publish/autoteams publish/autoteams-linux64
|
||||
- dotnet publish --configuration Release -o publish -p:PublishSingleFile=true --self-contained false -r win-x64 -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
- mv publish/autoteams.exe publish/autoteams-win64.exe
|
||||
- dotnet publish --configuration Release -o publish -p:PublishSingleFile=true --self-contained false -r osx-x64 -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
- mv publish/autoteams publish/autoteams-osx64
|
||||
artifacts:
|
||||
paths:
|
||||
- publish/autoteams-linux64
|
||||
- publish/autoteams-win64.exe
|
||||
- publish/autoteams-osx64
|
||||
tags:
|
||||
- docker
|
Loading…
Reference in a new issue