@@ -33,45 +33,49 @@ jobs:
3333 body="Release $tag"
3434 gh release create --draft "$tag" --title "$tag" --notes "$body"
3535
36+ build_android :
37+ name : Build Android
38+ runs-on : ubuntu-latest
39+ steps :
40+ - uses : actions/checkout@v4
41+ with :
42+ submodules : true
43+ - name : Build Android
44+ uses : ./.github/actions/android
45+ with :
46+ gpg-key : ${{ secrets.GPG_PRIVATE_KEY }}
47+ gpg-password : ${{ secrets.GPG_PASSWORD }}
48+
3649 publish_android :
3750 permissions :
3851 contents : read
3952 packages : write
4053 name : Publish Android
41- needs : [draft_release]
54+ needs : [draft_release, build_android ]
4255 runs-on : ubuntu-latest
4356 steps :
44- - uses : actions/checkout@v3
57+ - uses : actions/checkout@v4
4558 with :
46- submodules : true
59+ fetch-depth : 0
4760
48- - uses : actions/setup-java@v3
61+ - uses : actions/download-artifact@v4
4962 with :
50- distribution : " temurin"
51- java-version : " 17"
63+ name : android-library
5264
53- - name : Setup
54- run : |
55- rustup toolchain install nightly-2025-04-15-x86_64-unknown-linux-gnu
56- rustup component add rust-src --toolchain nightly-2025-04-15-x86_64-unknown-linux-gnu
57- rustup target add \
58- aarch64-linux-android \
59- armv7-linux-androideabi \
60- x86_64-linux-android \
61- i686-linux-android
62- cargo install cargo-ndk
63-
64- - name : Publish for Android
65+ - name : Publish to Maven Central
6566 if : ${{ inputs.publish }}
6667 run : |
67- cd android
68- ./gradlew publish
69- env :
70- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
71- OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
72- OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
73- GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
74- GPG_PASSWORD : ${{ secrets.GPG_PASSWORD }}
68+ curl --request POST \
69+ --header 'Authorization: Bearer ${{ secrets.CENTRAL_AUTH }}' \
70+ --form bundle=@powersync_android.zip \
71+ 'https://central.sonatype.com/api/v1/publisher/upload?publishingType=AUTOMATIC'
72+
73+ - name : Upload binary
74+ uses : ./.github/actions/upload
75+ with :
76+ repo-token : ${{ secrets.GITHUB_TOKEN }}
77+ file-name : powersync-android.zip
78+ tag : ${{ needs.draft_release.outputs.tag }}
7579
7680 publish_ios_pod_and_spm_package :
7781 name : Publish iOS
0 commit comments