@@ -12,13 +12,13 @@ jobs:
1212 if : github.event.comment.body == 'Build test apk' && (github.actor == 'VishalNehra' || github.actor == 'TranceLove' || github.actor == 'EmmanuelMess' || github.actor == 'VishnuSanal')
1313 steps :
1414 - name : Acknowledge the request with thumbs up reaction
15- uses : peter-evans/create-or-update-comment@v2
15+ uses : peter-evans/create-or-update-comment@v5
1616 with :
1717 comment-id : ${{ github.event.comment.id }}
1818 reactions : ' +1'
1919 - name : Github API Request
2020 id : request
21- uses : octokit/request-action@v2.0.2
21+ uses : octokit/request-action@v3
2222 with :
2323 route : ${{ github.event.issue.pull_request.url }}
2424 env :
@@ -30,33 +30,88 @@ jobs:
3030 echo "::set-output name=repo_clone_url::${{ fromJson(steps.request.outputs.data).head.repo.clone_url }}"
3131 echo "::set-output name=repo_ssh_url::${{ fromJson(steps.request.outputs.data).head.repo.ssh_url }}"
3232 - name : Checkout PR Branch
33- uses : actions/checkout@v4
33+ uses : actions/checkout@v6
3434 with :
3535 token : ${{ secrets.GITHUB_TOKEN }}
3636 repository : ${{fromJson(steps.request.outputs.data).head.repo.full_name}}
3737 ref : ${{fromJson(steps.request.outputs.data).head.ref}}
38- - name : Set up JDK 11
39- uses : actions/setup-java@v4
38+ - name : Set up JDK 17
39+ uses : actions/setup-java@v5
4040 with :
4141 distribution : " temurin"
42- java-version : 11
42+ java-version : 17
43+ - name : Set up NDK
44+ uses : nttld/setup-ndk@v1
45+ with :
46+ ndk-version : r28c
47+ link-to-sdk : true
48+ local-cache : true
49+ - name : Install Rust
50+ uses : dtolnay/rust-toolchain@stable
51+ with :
52+ toolchain : stable
53+ - name : Cache Rust dependencies
54+ uses : actions/cache@v5
55+ with :
56+ path : |
57+ ~/.cargo/bin/
58+ ~/.cargo/registry/index/
59+ ~/.cargo/registry/cache/
60+ ~/.cargo/git/db/
61+ file_operations/target/
62+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
63+ restore-keys : |
64+ ${{ runner.os }}-cargo-
65+ - name : Setup Rust for Android
66+ run : |
67+ cd file_operations
68+ chmod +x setup_rust_android.sh
69+ ./setup_rust_android.sh
70+ - name : Verify Rust setup
71+ run : |
72+ cd file_operations
73+ echo "🔍 Verifying Rust Android targets..."
74+ rustup target list --installed | grep android || echo "No Android targets found"
75+ echo "🔍 Verifying cargo configuration..."
76+ if [ -f .cargo/config.toml ]; then
77+ echo "✅ .cargo/config.toml exists"
78+ else
79+ echo "❌ .cargo/config.toml missing"
80+ exit 1
81+ fi
4382 - name : Build with Gradle
44- uses : gradle/actions/setup-gradle@v3
83+ uses : gradle/actions/setup-gradle@v6
4584 with :
4685 arguments : assembleDebug --stacktrace
4786 - name : Upload fdroid artifact
48- uses : actions/upload-artifact@v4
87+ uses : actions/upload-artifact@v7
88+ id : artifact-upload-fdroid
4989 with :
5090 name : Amaze-Fdroid-debug
5191 path : app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
92+ if-no-files-found : error
5293 - name : Upload play artifact
53- uses : actions/upload-artifact@v4
94+ uses : actions/upload-artifact@v7
95+ id : artifact-upload-play
5496 with :
5597 name : Amaze-Play-debug
5698 path : app/build/outputs/apk/play/debug/app-play-debug.apk
57- - name : Notify the user with a comment once the APK is uploaded # TODO: update this with the link to the artifacts
58- uses : peter-evans/create-or-update-comment@v2
99+ if-no-files-found : error
100+ - name : Get the PR number
101+ id : find-pr-id
102+ run : |
103+ PR_NUMBER=$(jq --raw-output .issue.number "$GITHUB_EVENT_PATH")
104+
105+ echo "PR_Number: $PR_NUMBER"
106+ echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_OUTPUT"
107+ - name : Notify the user with a comment once the APK is uploaded
108+ uses : peter-evans/create-or-update-comment@v5
59109 with :
60- issue-number : ${{ github.event.issue.number }}
110+ issue-number : ${{ steps.find-pr-id.outputs.PR_NUMBER }}
61111 body : |
62- The requested APKs has been built. Please find them from the artifacts section of this PR.
112+ Requested APKs have been built. Please find them from the links below.
113+
114+ FDroid Flavour: ${{ steps.artifact-upload-fdroid.outputs.artifact-url }}
115+ Play Flavour: ${{ steps.artifact-upload-play.outputs.artifact-url }}
116+
117+ PS: you should be logged in to access the artifacts.
0 commit comments