File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 1
- name : Dotnet CI build
1
+ name : Dotnet build & publish
2
2
3
3
on :
4
4
push :
5
- branches : [ "develop" ]
6
- pull_request :
7
5
branches : [ develop, main ]
8
6
9
7
jobs :
@@ -16,15 +14,21 @@ jobs:
16
14
17
15
steps :
18
16
- uses : actions/checkout@v3
17
+ - name : Setup MSBuild
18
+ uses : microsoft/setup-msbuild@v1.1.3
19
19
- name : Setup .NET
20
20
uses : actions/setup-dotnet@v3
21
21
with :
22
22
dotnet-version : 7.0.x
23
- - name : Install MAUI workload
24
- run : dotnet workload install maui
25
23
- name : Install dependencies
26
24
run : dotnet restore $SOLUTION
27
25
- name : Build
28
- run : dotnet build $SOLUTION --configuration Release --no-restore
29
- - name : Create the package
30
- run : dotnet pack $SOLUTION --configuration Release
26
+ run : msbuild $SOLUTION -p:Configuration=Release -p:RestorePackages=false -verbosity:minimal
27
+
28
+ publish :
29
+ runs-on : windows-latest
30
+ needs : build
31
+ if : github.ref == 'refs/heads/main' # Deploy for main branch
32
+ steps :
33
+ - name : Publish the package to Nuget.org
34
+ run : dotnet nuget push **\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.PUBLISH_TO_NUGET_ORG}} --skip-duplicate
You can’t perform that action at this time.
0 commit comments