Skip to content
Open
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
21 changes: 10 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,24 @@ jobs:
dotnet-version: '9.0.x'

- name: List Project Structure
run: Get-ChildItem -Path . -Recurse -Depth 2
run: Get-ChildItem -Path . -Recurse -Depth 3 # List all files to verify path

# Install workloads with --skip-manifest-update to prevent issues
- name: Install MAUI Workload
run: dotnet workload install android ios maccatalyst wasm-tools maui --skip-manifest-update

# Change to the correct directory before subsequent operations
- name: Restore Dependencies
- name: Restore Dependencies (with detailed logging)
run: |
cd ./FeedOptimizationApp
dotnet restore FeedOptimizationApp.sln
cd /workspaces/Feed-optimization-App # Change to the root directory of the repository
dotnet restore FeedOptimizationApp.sln --verbosity detailed # Restore dependencies

- name: Build Android App
run: |
cd ./FeedOptimizationApp
dotnet build FeedOptimizationApp.sln -f net9.0-android -c Release
cd /workspaces/Feed-optimization-App # Ensure we're in the correct directory
dotnet build FeedOptimizationApp.sln -f net9.0-android -c Release # Build the solution

- name: Create Android APK
run: |
cd ./FeedOptimizationApp
cd /workspaces/Feed-optimization-App # Ensure we're in the correct directory
dotnet publish FeedOptimizationApp.sln -f net9.0-android -c Release -o ./publish
if (Test-Path ./publish/*.apk) {
Get-ChildItem ./publish/*.apk | Select-Object -First 1 | Move-Item -Destination ./publish/App.apk
Expand All @@ -53,7 +51,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Android-APK
path: ./FeedOptimizationApp/publish/App.apk
path: /workspaces/Feed-optimization-App/publish/App.apk

deploy-android:
name: Deploy to Google Play
Expand Down Expand Up @@ -93,4 +91,5 @@ jobs:
curl -H "Content-Type: application/json" \
-d '{"text": "🚀 New MAUI App build deployed to Google Play! 🎉"}' \
-X POST "${{ secrets.TEAMS_WEBHOOK_URL }}"
-X POST "${{ secrets.TEAMS_WEBHOOK_URL }}"


Loading