-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (50 loc) · 1.62 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
stages:
- package
- deployment
# Create internal nuget package
package:
stage: package
image: mcr.microsoft.com/dotnet/sdk:6.0
cache:
key: linux-build
paths:
- /root/.local/share/NuGet/Cache
- /root/.nuget/packages
- .nuget
only:
- master
- /^release_.*$/
- /^\d+_F_.*$/
tags:
- x86
artifacts:
when: always
paths:
- publish
script:
# This assumes that Debug is the correct build to
- for TestProject in *Tests/*Tests.csproj; do dotnet test -c ${TestConfiguration:-Debug} $TestProject; done
- for PackageProject in *Nuget/*Nuget.csproj; do dotnet build --ignore-failed-sources -c ${PublishConfiguration:-Debug}; done
- for PackageProject in *Nuget/*Nuget.csproj; do dotnet pack -c ${PublishConfiguration:-Debug} --include-source --include-symbols -p:SymbolPackageFormat=snupkg --output publish $PackageProject; done
#Publish internal nuget package
nugetInternal:
stage: deployment
image: mcr.microsoft.com/dotnet/sdk:6.0
cache:
key: linux-build
paths:
- /root/.local/share/NuGet/Cache
- /root/.nuget/packages
- .nuget
when: manual
allow_failure: true
only:
- master
- /^release_.*$/
- /^\d+_F_.*$/
tags:
- x86
script:
- cd publish
- for fileName in *.nupkg; do dotnet nuget push -s https://nuget.skywardapps.us/v3/index.json ${fileName}; done
- for fileName in *.snupkg; do dotnet nuget push -s https://nuget.skywardapps.us/v3/index.json ${fileName}; done