Skip to content

Commit

Permalink
Update dotnet - publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 authored Jan 12, 2023
1 parent 696272d commit 50ac843
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/dotnet - publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Dotnet Publish
on:
push:
branches: [ develop, main ]
branches: [ main ]

jobs:
build:
Expand All @@ -13,6 +13,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
Expand All @@ -21,7 +23,7 @@ jobs:
run: dotnet workload install maui
- name: Install dependencies
run: dotnet restore $SOLUTION
- name: Build
run: dotnet build $SOLUTION --configuration Release --no-restore
- name: Create the package
run: dotnet pack $SOLUTION --configuration Release
- name: Build & Package
run: msbuild $SOLUTION -p:Configuration=Release -p:RestorePackages=false
- name: Publish the package to Nuget.org
run: dotnet nuget push **\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.PUBLISH_TO_NUGET_ORG}} --skip-duplicate

0 comments on commit 50ac843

Please sign in to comment.