-
-
Notifications
You must be signed in to change notification settings - Fork 66
39 lines (33 loc) · 1.15 KB
/
dotnet.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
name: Dotnet build & publish
on:
push:
branches: [ media3 ]
pull_request:
branches: [ media3 ]
jobs:
build:
env:
SOLUTION: 'Media3.sln'
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1.3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Install MAUI Workloads
run: |
dotnet workload install android --ignore-failed-sources
dotnet workload install maui --ignore-failed-sources
- name: Install dependencies
run: dotnet restore $SOLUTION
- name: Build
run: dotnet build --configuration Release
- name: Publish
if: startsWith(github.ref, 'refs/heads/main')
run: dotnet nuget push artifacts\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.PUBLISH_TO_NUGET_ORG}} --skip-duplicate
- name: Publish Xamarin
if: startsWith(github.ref, 'refs/heads/xamarin')
run: dotnet nuget push artifacts\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.PUBLISH_TO_NUGET_ORG}} --skip-duplicate