-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (29 loc) · 1.05 KB
/
cd.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
28
29
30
31
32
33
34
35
36
name: CD
on:
push:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
- name: Update Assembly Version
run: |
python .openapi-generator/update_assembly_version.py
- name: Build
run: |
dotnet --version
dotnet restore
dotnet build --configuration Release
- name: Run Unit Tests
working-directory: src/PollinationSDK.Tests
run: |
$Env:PollinationApiKey = "${{secrets.POLLINATION_STAGING_APIKEY}}"
$Env:PollinationApiKeyProduction = "${{secrets.POLLINATION_PRODUCTION_APIKEY}}"
dotnet test --configuration Release
- name: Deploy
working-directory: src/PollinationSDK
run: |
dotnet pack --configuration Release -o nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
dotnet nuget push bin\Release\PollinationSDK.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json