-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild-release.yaml
27 lines (26 loc) · 1.68 KB
/
cloudbuild-release.yaml
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
steps:
- name: gcr.io/cloud-builders/git
args: ['fetch', '--unshallow']
- name: gcr.io/graphschema/dotnet_gitversion
args: ['bash', '-c', 'dotnet-gitversion /showvariable FullSemVer | sed "s/+/-/g" > GITVERSION']
- name: microsoft/dotnet:2.2-sdk
args: ['bash', '-c', 'dotnet build -c Release -p:Version=$(cat GITVERSION)']
- name: microsoft/dotnet:2.2-sdk
args: ['bash', '-c', 'dotnet test -c Release -p:Version=$(cat GITVERSION) --no-build --no-restore']
- name: microsoft/dotnet:2.2-sdk
args: ['bash', '-c', 'dotnet pack source/GraphQL.Client/GraphQL.Client.csproj -c Release -p:Version=$(cat GITVERSION) --no-restore --no-build --output ../../artifacts --include-symbols -p:SymbolPackageFormat=snupkg']
- name: microsoft/dotnet:2.2-sdk
args: ['bash', '-c', 'dotnet pack source/GraphSchema.io.Client/GraphSchema.io.Client.csproj -c Release -p:Version=$(cat GITVERSION) --no-restore --no-build --output ../../artifacts']
- name: microsoft/dotnet:2.2-sdk
entrypoint: 'bash'
args: ['-c', 'dotnet nuget push artifacts/GraphSchema.GraphQL.Client.$(cat GITVERSION).nupkg -k $$NUGET_KEY -s https://api.nuget.org/v3/index.json']
secretEnv: ['NUGET_KEY']
- name: microsoft/dotnet:2.2-sdk
entrypoint: 'bash'
args: ['-c', 'dotnet nuget push artifacts/GraphSchema.io.Client.$(cat GITVERSION).nupkg -k $$NUGET_KEY -s https://api.nuget.org/v3/index.json']
secretEnv: ['NUGET_KEY']
timeout: 240s
secrets:
- kmsKeyName: projects/graphschemaio/locations/global/keyRings/graphschemaio-keys/cryptoKeys/nuget-key
secretEnv:
NUGET_KEY: CiQA/F0xt5ED6KEagY03fqOcMNAHdfuUFRt4hScA4f3xL6Li0AcSWABcFlmfltBLf34SfAZl30CAjRQYhS02nxzmq0usLSIpqBDi/nn1tIkqx9JzR7pQmXhZ5yGYIYFRKUQ6PQG2RGiJf+jb8tmcO+WsVrlQUM7AmDZmaFLD/ao=