Update main.yml #19
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
DOTNETVERSION: 8.0.x | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
Android: | |
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/dotnet8/nuget/v3/index.json --source https://api.nuget.org/v3/index.json | |
dotnet workload install android ios maui wasm-tools --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json --source https://api.nuget.org/v3/index.json | |
- name: Restore nuget packages | |
run: | | |
cd src | |
dotnet restore QuickStockTaker.sln | |
- name : Build Android App | |
shell: bash | |
run: | | |
cd src/QuickStockTaker | |
dotnet publish -f:net8.0-android -c:Release |