forked from tyronbrand/flow.net
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (39 loc) · 1.99 KB
/
SDK-deploy.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
name: "Deploy to NuGet"
on:
push:
branches: [ main ]
tags:
- 'v*'
env:
CORE_SDK_PROJECT_PATH: 'src/Flow.Net.Sdk.Core/Flow.Net.Sdk.Core.csproj'
HTTP_SDK_PROJECT_PATH: 'src/Flow.Net.Sdk.Client.Http/Flow.Net.Sdk.Client.Http.csproj'
GRPC_SDK_PROJECT_PATH: 'src/Flow.Net.Sdk.Client.Grpc/Flow.Net.Sdk.Client.Grpc.csproj'
SDK_PROJECT_PATH: 'src/Flow.Net.SDK/Flow.Net.Sdk.csproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json'
jobs:
deploy:
name: 'Deploy'
runs-on: 'windows-latest'
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: 'Get Version'
id: version
uses: battila7/get-version-action@v2
- name: Test
run: dotnet test
- name: 'Pack Core project'
run: dotnet pack ${{ env.CORE_SDK_PROJECT_PATH }} --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: 'Pack HTTP SDK project'
run: dotnet pack ${{ env.HTTP_SDK_PROJECT_PATH }} --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: 'Pack gRPC project'
run: dotnet pack ${{ env.GRPC_SDK_PROJECT_PATH }} --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: 'Pack combined SDK project'
run: dotnet pack ${{ env.SDK_PROJECT_PATH }} --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: 'Push packages'
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }}