-
-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (43 loc) · 1.55 KB
/
PackageCI.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
name: Build and publish packages
on:
push:
branches:
- main
- develop
paths-ignore:
- '**/README.md'
jobs:
build:
name: Build and publish package
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.x.x
- name: Nerdbank.GitVersioning
uses: dotnet/[email protected]
id: nbgv
with:
setAllVars: true
- uses: actions/setup-java@v2
with:
distribution: 'microsoft'
java-version: '11'
- name: Install MAUI Workloads
run: |
dotnet workload install android --ignore-failed-sources
dotnet workload install maui --ignore-failed-sources
- name: Build
run: dotnet build ./Maui.NeoControls.sln --configuration Release
- name: Pack
run: dotnet pack ./Maui.NeoControls.sln --output ./artifacts --configuration Release -p:Version=${{ steps.nbgv.outputs.SemVer2 }}
- name: Push Nupkg to GitHub Packages
if: github.ref == 'refs/heads/develop'
run: dotnet nuget push **\*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/felipe.baltazar/index.json --skip-duplicate
- name: Publish to Nuget.org
if: github.ref == 'refs/heads/main'
run: dotnet nuget push **\*.nupkg --api-key ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json --skip-duplicate