Create main.yml #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automated Test Build | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: windows-2019 | |
env: | |
Solution_Name: libWindbot.sln | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: gu | |
run: dir C:\Android\android-sdk\platforms | |
- name: gugu | |
run: dir C:\Android\android-sdk\platforms | |
- name: Install Mono | |
run: | | |
bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://download.mono-project.com/archive/5.12.0/windows-installer/mono-5.12.0-gtksharp-2.12.45-win32-0.msi ; exit 0" | |
cmd /c start /wait msiexec /i mono-5.12.0-gtksharp-2.12.45-win32-0.msi /quiet /norestart | |
- name: gugug | |
run: | | |
dir "C:\Program Files (x86)\Mono\lib\mono\4.5" | |
#dir "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\" | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
with: | |
packages: 'platforms;android-25 platforms;android-24' | |
- name: Reg path | |
run: | | |
$dir = Get-ChildItem -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances" -Directory | |
$vsRandomID = $dir[0].Name | |
reg add HKCU\Software\Xamarin\VisualStudio\16.0_${vsRandomID}\Android /v JavaSdkDirectory /d "C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot" /f | |
reg add HKCU\Software\Xamarin\VisualStudio\16.0_${vsRandomID}\Android /v AndroidSdkDirectory /d "C:\Android\android-sdk" /f | |
reg add HKCU\Software\Xamarin\VisualStudio\16.0_${vsRandomID}\Android /v AndroidNdkDirectory /d "C:\hostedtoolcache\windows\ndk\r15c\x64" /f | |
xcopy /e /y "C:\Program Files (x86)\Mono\lib\mono\4.5\mscorlib.dll" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0" | |
# xcopy /e /y "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" | |
# xcopy /e /y "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0" "C:\Users\runneradmin\.nuget\packages\embeddinator-4000\0.4.0\external\Xamarin.Android\lib\xbuild-frameworks\MonoAndroid\v1.0\" | |
- name: Install NDK r15c | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r15c | |
- name: gugugu | |
run: | | |
dir C:\hostedtoolcache\windows\ndk\r15c | |
dir C:\hostedtoolcache\windows\ndk\r15c\x64 | |
dir C:\hostedtoolcache\windows\ndk\r15c\x64\platforms\android-24\ | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v2 | |
- name: Restore the application | |
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=Release | |
#- name: Fixed E4K | |
# run: | | |
# Invoke-WebRequest -Uri "https://github.com/mercury233/libWindbot/files/14755286/tools.zip" -OutFile "fixed-e4k-tools.zip" | |
# Expand-Archive -Path "fixed-e4k-tools.zip" -DestinationPath "C:\Users\runneradmin\.nuget\packages\embeddinator-4000\0.4.0\" -Force | |
- name: Build! | |
run: msbuild $env:Solution_Name /t:Build /p:Configuration=Release | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: output\libWindbot.aar | |
- name: GitHub Release | |
#if: github.event_name == 'push' | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: "Development Build" | |
files: | | |
output/libWindbot.aar |