-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (53 loc) · 1.7 KB
/
Copy pathci-cd.yml
File metadata and controls
68 lines (53 loc) · 1.7 KB
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
66
67
68
name: CI-CD
on:
push:
branches:
- main
- copilot/**
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x
- name: Restore test project
run: dotnet restore tests/GeneralUpdate.Avalonia.Android.Tests/GeneralUpdate.Avalonia.Android.Tests.csproj
- name: Run unit tests
run: dotnet test tests/GeneralUpdate.Avalonia.Android.Tests/GeneralUpdate.Avalonia.Android.Tests.csproj --configuration Release --no-restore
pack:
name: Build and Pack Android Library
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x
- name: Install Android workload
run: dotnet workload install android
- name: Restore
run: dotnet restore GeneralUpdate.Avalonia.slnx
- name: Build Android project
run: dotnet build src/GeneralUpdate.Avalonia.Android/GeneralUpdate.Avalonia.Android.csproj --configuration Release --no-restore
- name: Pack NuGet
run: dotnet pack src/GeneralUpdate.Avalonia.Android/GeneralUpdate.Avalonia.Android.csproj --configuration Release --no-build -o artifacts
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: generalupdate-avalonia-android-nuget
path: artifacts/*.nupkg