Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build-and-deploy.yml #540

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build .NET MAUI Project

on:
workflow_dispatch:
push:
branches: [ "develop" ]
paths-ignore:
- "**.md"
pull_request:
branches: [ "develop" ]
create:
tags:
- '*'

env:
BUILD_CONFIGURATION: Release
DOTNET_VERSION: 8.0.x
CSPROJ_TO_BUILD: SharedMauiXamlStylesLibrary.SampleApp.csproj

jobs:
build-ci:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install .NET MAUI Workload
run: dotnet workload install maui
- name: Restore dependencies
run: dotnet restore ${{ env.CSPROJ_TO_BUILD }}
- name: Build ${{ env.CSPROJ_TO_BUILD }}
run: dotnet build ${{ env.CSPROJ_TO_BUILD }} -c ${{ env.BUILD_CONFIGURATION }} -f:net8.0-android
- name: Publish APK
run: dotnet publish ${{ env.CSPROJ_TO_BUILD }} -c ${{ env.BUILD_CONFIGURATION }} -f:net8.0-android -o ./output
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: apk
path: ./output/*.apk
Loading