Skip to content

Test

Test #24

name: windowsCI
on:
push:
branches: [ maui ]
pull_request:
branches: [ maui ]
workflow_dispatch:
env:
DOTNETVERSION: 7.0.404
jobs:
buildAndroid:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Setup .NET SDK ${{env.DOTNETVERSION}}
uses: actions/setup-dotnet@v1
with:
dotnet-version: '${{env.DOTNETVERSION}}'
- name: List installed .NET info
shell: pwsh
run: dotnet --info
- name: Install .NET MAUI
shell: bash
run: |
dotnet nuget locals all --clear
dotnet workload install maui --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json --source https://api.nuget.org/v3/index.json
dotnet workload install android maui wasm-tools --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json --source https://api.nuget.org/v3/index.json
- name: Setup Java 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Restore nuget packages
run: |
dotnet restore BusSchedule.sln
- name: Load Google Service file
env:
DATA: ${{ secrets.GOOGLE_SERVICES_JSON_TEXT }}
run: |
touch BusSchedule.Android/Assets/google-services.json
echo $DATA > BusSchedule.Android/Assets/google-services.json
# cat BusSchedule.Android/Assets/google-services.json
- name: Read file contents
id: read_file
uses: andstor/file-reader-action@v1
with:
path: "BusSchedule.Android/Assets/google-services.json"
- name: File contents
run: echo "${ steps.read_file.outputs.contents }"
- name: Build
run: |
dotnet build BusSchedule.Android/BusSchedule.Android.csproj -c Release --no-restore