Skip to content

Commit

Permalink
Initial android support for actions
Browse files Browse the repository at this point in the history
Uses ubuntu-24.04 for android building
  • Loading branch information
sounddrill31 authored Nov 10, 2024
1 parent 68c9eb9 commit 025f10c
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
os: [windows-latest, ubuntu-latest, ubuntu-24.04 ] # 24.04 is for android

steps:
- name: Checkout code
Expand All @@ -25,17 +25,41 @@ jobs:
with:
dotnet-version: '8.0.x' # Specify your .NET version here

- name: Set up JDK 17
if: matrix.os == 'ubuntu-24.04'
# 24.04 is android
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Android SDK
if: matrix.os == 'ubuntu-24.04'
# 24.04 is android
uses: android-actions/setup-android@v3

- name: Restore dependencies
run: |
dotnet workload restore
- name: Build
if: matrix.os != 'ubuntu-24.04'
# 24.04 is android
run: dotnet build VowelCountApp/VowelCountApp.Desktop --configuration Release #--no-restore

- name: Publish
if: matrix.os != 'ubuntu-24.04'
# 24.04 is android
run: dotnet publish VowelCountApp/VowelCountApp.Desktop --configuration Release --output ./output

- name: Zip folder on Linux
- name: Build and Publish For android
if: matrix.os == 'ubuntu-24.04'
# 24.04 is android
run: |
dotnet build VowelCountApp/VowelCountApp.Android --configuration Release
dotnet publish VowelCountApp/VowelCountApp.Android --configuration Release --output ./output
- name: Zip folder on Linux
if: matrix.os == 'ubuntu-latest'
run: zip -r VowelCountApp-${{ matrix.os }}-${{ github.run_id }}.zip ./output/*

Expand All @@ -54,6 +78,8 @@ jobs:
with:
files: |
VowelCountApp-${{ matrix.os }}-${{ github.run_id }}.zip
output/*.apk
#android doesn't need Zipping, so direct upload
name: VowelCountApp-${{ github.run_id }}
tag_name: ${{ github.run_id }}
env:
Expand Down

0 comments on commit 025f10c

Please sign in to comment.