Create main.yml #16
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@v3 | |
with: | |
fetch-depth: 0 | |
#- name: Cache nuget | |
# uses: actions/cache@v3 | |
# with: | |
# path: ~/.nuget/packages | |
# key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
# restore-keys: | | |
# ${{ runner.os }}-nuget- | |
- 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" | |
msiexec /i mono-5.12.0-gtksharp-2.12.45-win32-0.msi /quiet /norestart | |
- name: Install NDK | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r15c | |
- name: Install Android SDK Platform 25 | |
run: C:\Users\runneradmin\AppData\Local\Android\Sdk\tools\bin\sdkmanager.bat "platforms;android-25" | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v1 | |
- name: Restore the application | |
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=Release | |
- name: Reg path | |
run: | | |
reg add HKCU\Software\Xamarin\VisualStudio\16.0_a5782d1b\Android /v JavaSdkDirectory /d "C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.345-1\x64" /f | |
reg add HKCU\Software\Xamarin\VisualStudio\16.0_a5782d1b\Android /v AndroidSdkDirectory /d "C:\Android\android-sdk" /f | |
reg add HKCU\Software\Xamarin\VisualStudio\16.0_a5782d1b\Android /v AndroidNdkDirectory /d "C:\hostedtoolcache\windows\ndk\r15c\x64" /f | |
#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: Build! | |
run: msbuild $env:Solution_Name /t:Build /p:Configuration=Release | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
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 |