-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
41 lines (38 loc) · 1.09 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
41 lines (38 loc) · 1.09 KB
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
stages:
- build-nupkg
- push
build-nupkg:
stage: build-nupkg
image: mcr.microsoft.com/dotnet/sdk:6.0
script:
- ./pack.sh $CI_COMMIT_TAG
artifacts:
paths:
- nuget-build
only:
- /^publish-.*$/
gitlab-registry-push:
stage: push
image: mcr.microsoft.com/dotnet/sdk:6.0
variables:
GIT_STRATEGY: none
needs:
- build-nupkg
script:
- dotnet nuget list source | grep "TDRs GitLab" && dotnet nuget remove source "TDRs GitLab"
- dotnet nuget add source "https://nuget.tdrs.ro/index.json" --name "TDRs GitLab" --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text
- dotnet nuget push "./nuget-build/*.nupkg" "./nuget-build/*.snupkg" --source "TDRs GitLab"
only:
- /^publish-.*$/
nuget-push:
stage: push
image: mcr.microsoft.com/dotnet/sdk:6.0
variables:
GIT_STRATEGY: none
needs:
- build-nupkg
script:
- dotnet nuget push "./nuget-build/*.nupkg" "./nuget-build/*.snupkg" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate
only:
- /^publish-.*$/
when: manual