forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 2.14 KB
/
build-gtk.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
name: Build Controls.Sample.Gtk
on: [push, pull_request]
jobs:
build_and_test:
name: Build & Test
runs-on: ubuntu-22.04
env:
GtkSharpVersion: 3.24.24.117-develop
GtkSharpManifestVersion: 8.0.200
DotnetVersion: 8.0.200
PROJECTS_TO_PACK: |
src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj
src/Essentials/src/Essentials.csproj
src/Controls/src/Core/Controls.Core.csproj
src/Controls/src/Xaml/Controls.Xaml.csproj
src/Core/src/Core.csproj
src/Compatibility/Core/src/Compatibility.csproj
src/Controls/Foldable/src/Controls.Foldable.csproj
steps:
- name: Checkout MAUI repo
uses: actions/checkout@v2
- name: Setup .NET SDK ${{ env.DotnetVersion }}
uses: actions/[email protected]
with:
dotnet-version: ${{ env.DotnetVersion }}
- name: Install gtk workload
run: ./install_gtk_workload.sh
- name: Build MAUI
run: |
mv Directory.Build.Override.props.in Directory.Build.Override.props
dotnet build Microsoft.Maui.BuildTasks.slnf
echo "$PROJECTS_TO_PACK" | while read -r project; do
[ -z "$project" ] && continue # Skip if empty
dotnet build -c Release "$project"
done
- name: Pack MAUI
run: ./pack_mali.sh
- name: Upload binaries to nuget (if tag or main branch, and nugetKey is present)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_KEY: ${{ secrets.NUGET_KEY }}
if: ${{ env.NUGET_KEY != '' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet-format:
needs: build_and_test
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Run dotnet format
run: |
# remark: doesnt work, alwasy fails:
# dotnet format whitespace ./src --folder --exclude Templates/src
git diff --exit-code