-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.38 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
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup nuget
uses: nuget/setup-nuget@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Setup .NET 5.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
- name: Run uno-check
shell: bash
run: |
dotnet tool install --global Uno.Check --version 1.27.1
uno-check -v --ci --non-interactive --fix --skip vswin --skip androidemulator
- name: Install Android SDK components
shell: bash
run: |
yes | sdkmanager "platform-tools" "platforms;android-29" "build-tools;29.0.3"
- name: Install dependencies
run: dotnet restore src/Elmah.Io.Uno/Elmah.Io.Uno.csproj
- name: Build
run: msbuild src/Elmah.Io.Uno/Elmah.Io.Uno.csproj -p:Configuration=Release
- name: Pack
run: nuget pack Elmah.Io.Uno.nuspec -Version 5.0.${{ github.run_number }}-pre -Properties Configuration=Release -Properties Commit=${{ github.sha }}
- name: Push
run: dotnet nuget push Elmah.Io.Uno.5.0.${{ github.run_number }}-pre.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
if: ${{ github.event_name == 'push' }}