Skip to content

Commit

Permalink
Fixed Windows YAML. Initial MAUI YAML.
Browse files Browse the repository at this point in the history
  • Loading branch information
skst committed Feb 20, 2024
1 parent ddd7bd3 commit 471387a
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ jobs:

# Work around https://github.com/actions/setup-dotnet/issues/155
- name: Clean solution
working-directory: ./Windows.Source
run: dotnet clean --configuration ${{env.BUILD_CONFIGURATION}}
run: dotnet clean CalculateX.Windows.sln --configuration ${{env.BUILD_CONFIGURATION}}
- name: Clean NuGet
working-directory: ./Windows.Source
run: dotnet nuget locals all --clear
run: dotnet nuget CalculateX.Windows.sln locals all --clear

# https://docs.microsoft.com/en-us/dotnet/core/tools/
- name: Build
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/maui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: MAUI

#
# Skip the workflow with one of the following:
# [skip ci]
# [ci skip]
# ***NO_CI***
#
# Note that a commit MUST include one of the following to create a release:
# #patch
# #minor
# #major
#

on:
workflow_dispatch:
branches: [ master, yaml ]
push:
branches: [ master, yaml ]
paths-ignore:
- '**/*.gitignore'
- '**/*.gitattributes'
- '**/*.md'
- 'LICENSE'
- 'CalculateX.png'
pull_request:
branches: [ master, yaml ]
paths-ignore:
- '**/*.gitignore'
- '**/*.gitattributes'
- '**/*.md'
- 'LICENSE'
- 'CalculateX.png'

permissions:
contents: read

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: CalculateX/CalculateX.csproj

# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release

#ARTIFACT_NAME: CalculateX
#ARTIFACT_PACKAGE: package-calculatex

concurrency:
group: calculatex-${{ github.ref }}-1
cancel-in-progress: true

# Jobs are run in parallel unless `needs` is specified.
# https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#creating-dependent-jobs
jobs:
build:
if: (github.event_name == 'workflow_dispatch') || (!contains(toJson(github.event.commits.*.message), '***NO_CI***') && !contains(toJson(github.event.commits.*.message), '[ci skip]') && !contains(toJson(github.event.commits.*.message), '[skip ci]'))

runs-on: windows-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Install MAUI workload
run: dotnet workload install maui
#--ignore-failed-sources

# Work around https://github.com/actions/setup-dotnet/issues/155
- name: Clean solution
run: dotnet clean CalculateX.MAUI.sln --configuration ${{env.BUILD_CONFIGURATION}}
- name: Clean NuGet
run: dotnet nuget CalculateX.MAUI.sln locals all --clear

# https://docs.microsoft.com/en-us/dotnet/core/tools/
- name: Build
working-directory: ./MAUI.Source
#run: dotnet build ${{env.SOLUTION_FILE_PATH}} --nologo --self-contained --configuration ${{env.BUILD_CONFIGURATION}} --runtime win-x64
run: dotnet build ${{env.SOLUTION_FILE_PATH}} --nologo --configuration ${{env.BUILD_CONFIGURATION}} --framework net8.0-android

- name: List folder
run: |
ls -la
ls -la ./MAUI.Source/CalculateX/bin/Release/net8.0-android/
# com.x12noon.calculatex-Signed.apk

0 comments on commit 471387a

Please sign in to comment.