@@ -33,45 +33,42 @@ 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+ - name : Build Android
41+ uses : ./.github/actions/android
42+
3643 publish_android :
3744 permissions :
3845 contents : read
3946 packages : write
4047 name : Publish Android
41- needs : [draft_release]
48+ needs : [draft_release, build_android ]
4249 runs-on : ubuntu-latest
4350 steps :
44- - uses : actions/checkout@v3
51+ - uses : actions/checkout@v4
4552 with :
46- submodules : true
47-
48- - uses : actions/setup-java@v3
49- with :
50- distribution : " temurin"
51- java-version : " 17"
53+ fetch-depth : 0
5254
53- - name : Setup
54- run : |
55- rustup toolchain install nightly-2024-05-18-x86_64-unknown-linux-gnu
56- rustup component add rust-src --toolchain nightly-2024-05-18-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
55+ - uses : actions/download-artifact@v4
56+ name : android-library
6357
64- - name : Publish for Android
58+ - name : Publish to Maven Central
6559 if : ${{ inputs.publish }}
6660 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 }}
61+ curl --request POST \
62+ --header 'Authorization: Bearer ${{ secrets.CENTRAL_AUTH }}' \
63+ 64+ https://central.sonatype.com/api/v1/publisher/upload
65+
66+ - name : Upload binary
67+ uses : ./.github/actions/upload
68+ with :
69+ repo-token : ${{ secrets.GITHUB_TOKEN }}
70+ file-name : powersync-android.zip
71+ tag : ${{ needs.draft_release.outputs.tag }}
7572
7673 publish_ios_pod_and_spm_package :
7774 name : Publish iOS
0 commit comments