Skip to content

Commit 9287dd7

Browse files
committed
ci(release): add android apk lane and pin jdk 23.0.1
1 parent 633bd2e commit 9287dd7

2 files changed

Lines changed: 69 additions & 1 deletion

File tree

.github/workflows/release-desktop-multi-os.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,71 @@ jobs:
205205
fail_on_unmatched_files: true
206206
env:
207207
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
208+
209+
build-and-upload-android:
210+
name: Build and Upload (android-apk)
211+
needs: ensure-release
212+
runs-on: ubuntu-latest
213+
214+
steps:
215+
- name: Checkout repository
216+
uses: actions/checkout@v5
217+
with:
218+
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.source_ref != '' && github.event.inputs.source_ref || github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref }}
219+
fetch-depth: 0
220+
lfs: true
221+
222+
- name: Setup Node.js
223+
uses: actions/setup-node@v5
224+
with:
225+
node-version: "20"
226+
cache: "npm"
227+
228+
- name: Setup Java 23.0.1
229+
uses: actions/setup-java@v5
230+
with:
231+
distribution: temurin
232+
java-version: "23.0.1"
233+
234+
- name: Setup Rust toolchain
235+
uses: dtolnay/rust-toolchain@stable
236+
237+
- name: Setup Android SDK
238+
uses: android-actions/setup-android@v3
239+
240+
- name: Install Android SDK dependencies
241+
shell: bash
242+
run: |
243+
set -euo pipefail
244+
yes | sdkmanager --licenses >/dev/null
245+
sdkmanager \
246+
"platform-tools" \
247+
"platforms;android-36" \
248+
"ndk;27.2.12479018"
249+
250+
- name: Install dependencies
251+
run: npm ci
252+
253+
- name: Build Android universal APK
254+
shell: bash
255+
run: |
256+
set -euo pipefail
257+
NOTE_CONNECTION_TAURI_ANDROID_TARGET=universal npm run tauri:android:build
258+
259+
- name: Upload workflow artifacts
260+
uses: actions/upload-artifact@v4
261+
with:
262+
name: release-${{ needs.ensure-release.outputs.tag_name }}-android-apk
263+
if-no-files-found: error
264+
path: |
265+
src-tauri/gen/android/app/build/outputs/apk/**/*.apk
266+
267+
- name: Upload APK assets to GitHub release
268+
uses: softprops/action-gh-release@v2
269+
with:
270+
tag_name: ${{ needs.ensure-release.outputs.tag_name }}
271+
files: |
272+
src-tauri/gen/android/app/build/outputs/apk/**/*.apk
273+
fail_on_unmatched_files: true
274+
env:
275+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "NoteConnection",
4-
"version": "1.6.0",
4+
"version": "1.6.1",
55
"identifier": "com.jacobinwwey.noteconnection",
66
"build": {
77
"beforeDevCommand": "",

0 commit comments

Comments
 (0)