-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (51 loc) · 1.55 KB
/
build.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ published ]
env:
BuildVersion: "CI.${{ github.run_id }}"
BuildBranch: "${{ github.ref }}"
DotNetVersion: '8.0.x'
jobs:
build-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotNetVersion }}
- name: Setup XCode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Install macos workload
run: dotnet workload install macos
- name: Build
run: dotnet build -m:1 -clp:NoSummary -c Release Eto.Veldrid.sln
- name: Pack
run: dotnet pack --no-build --no-restore -m:1 -clp:NoSummary -c Release Eto.Veldrid.sln
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: nuget
path: artifacts/nuget/**/*.nupkg
publish:
needs: build-mac
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotNetVersion }}
- name: Download NuGet Packages
uses: actions/download-artifact@v4
with:
name: nuget
- name: Push packages
run: dotnet nuget push './**/*.nupkg' --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}