-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
85 lines (72 loc) · 3.91 KB
/
appveyor.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
image: Visual Studio 2022
branches:
# whitelist
only:
- master
skip_tags: false
skip_non_tags: false
version: '{build}'
install:
- ps: $env:package_version = (Invoke-WebRequest -URI "https://api.github.com/repos/JukaLang/juka/releases/latest" -UseBasicParsing | ConvertFrom-Json).tag_name
- ps: $env:changelog = (Invoke-WebRequest -URI "https://api.github.com/repos/JukaLang/juka/releases/latest" -UseBasicParsing | ConvertFrom-Json).body.Split([Environment]::NewLine) | Select -Skip 1 | Out-String
- ps: Update-AppveyorBuild -Version "$env:package_version"
dotnet_csproj:
patch: true
file: '*.csproj'
version: '{version}'
package_version: $(APPVEYOR_BUILD_VERSION)
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
environment:
token:
secure: YPPyzDbCboQKYOfAl/4XahyYfDiWOsyjoL2WjyNOxH4=
ANDROID_HOME: "C:\\Program Files (x86)\\Android\\android-sdk\\"
before_build:
- appveyor DownloadFile https://dl.google.com/android/repository/commandlinetools-win-8512546_latest.zip
- 7z x commandlinetools-win-8512546_latest.zip -o"C:\Program Files (x86)\Android\android-sdk\cmdline-tools" > nul
- mv "C:\Program Files (x86)\Android\android-sdk\cmdline-tools\cmdline-tools" "C:\Program Files (x86)\Android\android-sdk\cmdline-tools\tools"
- yes | "C:\Program Files (x86)\Android\android-sdk\cmdline-tools\tools\bin\sdkmanager.bat" --licenses
- yes | "C:\Program Files (x86)\Android\android-sdk\cmdline-tools\tools\bin\sdkmanager.bat" "platform-tools" "platforms;android-33"
- ps: dotnet workload install maui
- ps: dotnet workload restore JukaApp.sln
- ps: dotnet add package JukaCompiler
- ps: |
$env:MY_XT= "$($env:APPVEYOR_REPO_COMMIT_MESSAGE)"
$env:MY_AV= $env:APPVEYOR_BUILD_VERSION
if ($env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)
{
$env:MY_XT="$($env:APPVEYOR_REPO_COMMIT_MESSAGE) \n $($env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)"
}
if ($env:APPVEYOR_BUILD_VERSION -notlike "0.*")
{
$env:MY_AV="$($env:package_version)-Nightly-$($env:APPVEYOR_BUILD_VERSION)"
Update-AppveyorBuild -Version "$env:MY_AV"
}
build_script:
- ps: certutil -user -p jukatest -importPFX Juka.pfx NoRoot
- ps: $mypwd = ConvertTo-SecureString -String "jukatest" -Force -AsPlainText
- ps: $Thumbprint = (Get-PfxData -Password $mypwd -FilePath "./Juka.pfx").EndEntityCertificates.Thumbprint
- ps: dotnet publish JukaApp.sln -f net8.0-android -c Release /p:AndroidKeyStore=True /p:AndroidSigningKeyStore=myapp.keystore /p:AndroidSigningKeyAlias=key /p:AndroidSigningKeyPass=jukarocks /p:AndroidSigningStorePass=jukarocks
- ps: dotnet publish JukaApp.sln -f net8.0-windows10.0.19041.0 -c Debug /p:PackageCertificateThumbprint="$Thumbprint" /p:AppxPackageSigningEnabled=true
- ps: Rename-Item -Path "bin\Debug\net8.0-windows10.0.19041.0\win10-x64\AppPackages\JukaApp_1.0.0.1_Debug_Test\JukaApp_1.0.0.1_x64_Debug.msix" -NewName "Juka_Windows_App_$env:MY_AV.msix"
- ps: Rename-Item -Path "bin\Release\net8.0-android\publish\com.jukalang.jukaapp-Signed.apk" -NewName "Juka_Android_App_$env:MY_AV.apk"
artifacts:
- path: 'bin\Debug\net8.0-windows10.0.19041.0\win10-x64\AppPackages\JukaApp_1.0.0.1_Debug_Test\Juka_Windows_App_$(APPVEYOR_BUILD_VERSION).msix'
name: Juka_Windows_App_$(APPVEYOR_BUILD_VERSION).msix
- path: 'bin\Release\net8.0-android\publish\Juka_Android_App_$(APPVEYOR_BUILD_VERSION).apk'
name: Juka_Android_App_$(APPVEYOR_BUILD_VERSION).apk
deploy:
# Deploy to GitHub Releases
- provider: GitHub
artifact: /.*/
tag: "$(MY_AV)"
release: "📦 JukaApp v$(MY_AV)"
description: "## 🍂 Juka Changes \n $(changelog) \n ## 📱 App Changes \n $(MY_XT)"
auth_token:
secure: v/vwWedaFbZZt7xBtarpKXtoaub9EY/zbvwdUz9Yccsc0rykWiDaV1zYuMjDb8kn
draft: false
prerelease: false
on:
branch: master # release from master branch only
APPVEYOR_REPO_TAG: false # deploy on tag push only