-
Notifications
You must be signed in to change notification settings - Fork 28
81 lines (76 loc) · 4.28 KB
/
release_stable.yml
File metadata and controls
81 lines (76 loc) · 4.28 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Release_Stable
on:
push:
tags:
- "**"
jobs:
build_artifact:
name: Build and upload artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build with dotnet
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
DOTNET_CLI_HOME: ${{ runner.temp }}/dotnet-cli-home
run: |
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/Dtmcli/Dtmcli.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/strong-name/Dtmcli.StrongName/Dtmcli.StrongName.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/Dtmgrpc/Dtmgrpc.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/strong-name/Dtmgrpc.StrongName/Dtmgrpc.StrongName.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/DtmCommon/DtmCommon.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/strong-name/DtmCommon.StrongName/DtmCommon.StrongName.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/DtmSERedisBarrier/DtmSERedisBarrier.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/DtmMongoBarrier/DtmMongoBarrier.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/DtmDapr/DtmDapr.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/Dtmworkflow/Dtmworkflow.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/strong-name/Dtmworkflow.StrongName/Dtmworkflow.StrongName.csproj
- name: Pack with dotnet
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
DOTNET_CLI_HOME: ${{ runner.temp }}/dotnet-cli-home
run: |
dotnet pack src/Dtmcli/Dtmcli.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/strong-name/Dtmcli.StrongName/Dtmcli.StrongName.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/Dtmgrpc/Dtmgrpc.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/strong-name/Dtmgrpc.StrongName/Dtmgrpc.StrongName.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/DtmCommon/DtmCommon.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/strong-name/DtmCommon.StrongName/DtmCommon.StrongName.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/DtmSERedisBarrier/DtmSERedisBarrier.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/DtmMongoBarrier/DtmMongoBarrier.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/DtmDapr/DtmDapr.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/Dtmworkflow/Dtmworkflow.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/strong-name/Dtmworkflow.StrongName/Dtmworkflow.StrongName.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: nugetpkgs
path: /home/runner/work/nugetpkgs
release_nuget:
name: Release to Nuget
needs: build_artifact
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: nugetpkgs
path: nugetpkgs
- name: list nugetpkgs
run: ls nugetpkgs
- name: Release
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
DOTNET_CLI_HOME: ${{ runner.temp }}/dotnet-cli-home
run: |
for file in nugetpkgs/*.nupkg
do
dotnet nuget push $file -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate -s https://www.nuget.org/api/v2/package
done