Skip to content

Commit

Permalink
build android
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Dec 19, 2024
1 parent 8bb8cba commit 9c454c3
Showing 1 changed file with 49 additions and 17 deletions.
66 changes: 49 additions & 17 deletions .github/workflows/fw-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ on:
branches:
- develop
- main

env:
VIEWER_BUILD_OUTPUT_DIR: backend/FwLite/FwLiteShared/wwwroot/viewer
jobs:
build-and-test:
name: Build FW Lite and run tests
Expand Down Expand Up @@ -70,9 +71,9 @@ jobs:
- name: Upload viewer artifacts
uses: actions/upload-artifact@v4
with:
name: fw-lite-viewer-app
name: fw-lite-viewer-js
if-no-files-found: error
path: frontend/viewer/dist
path: ${{ env.VIEWER_BUILD_OUTPUT_DIR }}

publish-mac:
name: Publish FW Lite app for Mac
Expand All @@ -86,8 +87,8 @@ jobs:
submodules: true
- uses: actions/download-artifact@v4
with:
name: fw-lite-viewer-app
path: frontend/viewer/dist
name: fw-lite-viewer-js
path: ${{ env.VIEWER_BUILD_OUTPUT_DIR }}
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'
Expand Down Expand Up @@ -123,16 +124,12 @@ jobs:
submodules: true
- uses: actions/download-artifact@v4
with:
name: fw-lite-viewer-app
path: frontend/viewer/dist
name: fw-lite-viewer-js
path: ${{ env.VIEWER_BUILD_OUTPUT_DIR }}
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'

- name: Dotnet build
working-directory: backend/FwLite/LocalWebApp
run: dotnet build --configuration Release

- name: Publish Linux
working-directory: backend/FwLite/LocalWebApp
run: dotnet publish -r linux-x64 --artifacts-path ../artifacts -p:PublishSingleFile=true -p:Version=${{ needs.build-and-test.outputs.semver-version }}
Expand All @@ -144,6 +141,38 @@ jobs:
if-no-files-found: error
path: backend/FwLite/artifacts/publish/LocalWebApp/*

publish-android:
name: Publish FW Lite app for Android
needs: build-and-test
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- uses: actions/download-artifact@v4
with:
name: fw-lite-viewer-js
path: ${{ env.VIEWER_BUILD_OUTPUT_DIR }}
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'

- name: Setup Maui
run: dotnet workload install maui-android

- name: Publish Android
working-directory: backend/FwLite/FwLiteDesktop
run: dotnet publish -f net9.0-android --artifacts-path ../artifacts -p:ApplicationDisplayVersion=${{ needs.build-and-test.outputs.semver-version }} -p:InformationalVersion=${{ needs.build-and-test.outputs.version }}

- name: Upload FWLite App artifacts
uses: actions/upload-artifact@v4
with:
name: fw-lite-android
if-no-files-found: error
path: backend/FwLite/artifacts/publish/FwLiteDesktop/*/*

publish-win:
name: Publish FW Lite app for Windows
needs: build-and-test
Expand All @@ -156,19 +185,15 @@ jobs:
submodules: true
- uses: actions/download-artifact@v4
with:
name: fw-lite-viewer-app
path: frontend/viewer/dist
name: fw-lite-viewer-js
path: ${{ env.VIEWER_BUILD_OUTPUT_DIR }}
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'

- name: Setup Maui
run: dotnet workload install maui-windows

- name: Dotnet build
working-directory: backend/FwLite/LocalWebApp
run: dotnet build --configuration Release

- name: Publish Windows MAUI portable app
working-directory: backend/FwLite/FwLiteDesktop
run: |
Expand Down Expand Up @@ -239,6 +264,10 @@ jobs:
with:
name: fw-lite-local-web-app-linux
path: fw-lite-local-web-app-linux
- uses: actions/download-artifact@v4
with:
name: fw-lite-android
path: fw-lite-android

- name: Zip artifacts
run: |
Expand All @@ -256,6 +285,9 @@ jobs:
fw-lite-msix/*
fw-lite-portable.zip
fw-lite-local-web-app-linux.zip
fw-lite-android/*.apk
fw-lite-android/*.aab
- name: Invalidate Lexbox Release endpoint
continue-on-error: true
run: |
Expand Down

0 comments on commit 9c454c3

Please sign in to comment.