-
Notifications
You must be signed in to change notification settings - Fork 36
84 lines (62 loc) · 3.51 KB
/
push-to-nuget.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
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
82
83
84
name: push-to-nuget
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: create ArtifactStagingDirectory folder
run: mkdir drop
# Building and copying React
- name: npm install durablefunctionsmonitor.react
run: npm install -legacy-peer-deps
working-directory: durablefunctionsmonitor.react
- name: npm build durablefunctionsmonitor.react
run: npm run build
working-directory: durablefunctionsmonitor.react
- name: copy statics to durablefunctionsmonitor.dotnetbackend/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetbackend/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetbackend/DfmStatics
- name: copy statics to durablefunctionsmonitor.dotnetisolated/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetisolated/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetisolated/DfmStatics
# Building and testing .NET
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests/*.csproj
- name: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests/*.csproj
- name: copy durablefunctionsmonitor.dotnetbackend to ArtifactStagingDirectory
run: cp -r durablefunctionsmonitor.dotnetbackend drop/durablefunctionsmonitor.dotnetbackend
- name: copy durablefunctionsmonitor.dotnetisolated to ArtifactStagingDirectory
run: cp -r durablefunctionsmonitor.dotnetisolated drop/durablefunctionsmonitor.dotnetisolated
- name: dotnet publish durablefunctionsmonitor.dotnetbackend
run: dotnet publish durablefunctionsmonitor.dotnetbackend --output drop/durablefunctionsmonitor.dotnetbackend/output
- name: dotnet publish durablefunctionsmonitor.dotnetisolated
run: dotnet publish durablefunctionsmonitor.dotnetisolated --output drop/durablefunctionsmonitor.dotnetisolated/output
# Building nuget packages
- name: copy LICENSE to durablefunctionsmonitor.dotnetbackend/output
run: cp LICENSE drop/durablefunctionsmonitor.dotnetbackend/output
- name: copy LICENSE.txt to durablefunctionsmonitor.dotnetisolated/output
run: cp durablefunctionsmonitor.dotnetisolated/LICENSE.txt drop/durablefunctionsmonitor.dotnetisolated/output
- name: Install latest nuget.exe
uses: nuget/[email protected]
- name: package dotnetbackend into a Nuget package
run: nuget pack drop/durablefunctionsmonitor.dotnetbackend/output/nuspec.nuspec -OutputDirectory drop
- name: package dotnetisolated into a Nuget package
run: nuget pack drop/durablefunctionsmonitor.dotnetisolated/output/nuspec.nuspec -OutputDirectory drop
# Pushing nuget packages
- name: push drop/DurableFunctionsMonitor.DotNetIsolated
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: nuget push drop/DurableFunctionsMonitor.DotNetIsolated.*.nupkg -ApiKey $NUGET_API_KEY -src https://api.nuget.org/v3/index.json
- name: push drop/DurableFunctionsMonitor.DotNetBackend
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: nuget push drop/DurableFunctionsMonitor.DotNetBackend.*.nupkg -ApiKey $NUGET_API_KEY -src https://api.nuget.org/v3/index.json