-
Notifications
You must be signed in to change notification settings - Fork 5
100 lines (94 loc) · 3.04 KB
/
main.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build and Publish .NET MAUI App
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
# Build and publish Android
build-android:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup Keystore File
run: |
echo "${{ secrets.KEYSTORE_FILE }}" > FastCfIPScanner.keystore.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD_GPG }}" --batch FastCfIPScanner.keystore.asc > FastCfIPScanner.keystore
- name: Install .NET MAUI
run: dotnet workload install maui
- name: Restore dependencies
run: dotnet restore
- name: Build Android
run: dotnet build -c Release -f net8.0-android /p:AndroidSigningKeyStore=FastCfIPScanner.keystore /p:AndroidSigningKeyAlias=key /p:AndroidSigningKeyPass="${{ secrets.KEYSTORE_PASSWORD }}" /p:AndroidSigningStorePass="${{ secrets.KEYSTORE_PASSWORD_ALIAS }}" --no-restore
- name: List directory contents
run: |
ls -r
- name: Create Android Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.TOKEN }} # Replace with your actual secret token
automatic_release_tag: "latest"
prerelease: true
title: "Android Build"
files: ./**/*.apk
# Build and publish Windows
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Update Workloads
run: dotnet workload update
- name: Install .NET MAUI
run: dotnet workload install maui
- name: Restore dependencies
run: dotnet restore
- name: Build Windows
run: |
dotnet build -c Release -f net8.0-windows --no-restore \
/p:TargetPlatformVersion=10.0.17763.0 \
/p:SupportedOSPlatformVersion=10.0.17763.0
- name: List directory contents
run: |
ls -r
- name: Create Windows Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.TOKEN }}
automatic_release_tag: "latest"
prerelease: true
title: "Windows Build"
files: ./**/*.exe
# Build and publish Linux
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install .NET MAUI
run: dotnet workload install maui
- name: Restore dependencies
run: dotnet restore
- name: Build Linux
run: dotnet build -c Release -f net8.0-linux --no-restore
- name: List directory contents
run: |
ls -r
- name: Create Linux Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.TOKEN }}
automatic_release_tag: "latest"
prerelease: true
title: "Linux Build"
files: ./**/*.AppImage