Skip to content

Commit a5e9a3a

Browse files
committed
Attach prebuilt libraries to GitHub releases
1 parent 8682730 commit a5e9a3a

File tree

6 files changed

+40
-12
lines changed

6 files changed

+40
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ jobs:
7373

7474
build_xcframeworks:
7575
name: Build XCFrameworks
76+
needs:
77+
- fetch_prebuilts
7678
runs-on: macos-latest
7779
steps:
7880
- uses: actions/checkout@v4
@@ -91,8 +93,13 @@ jobs:
9193
uses: gradle/actions/setup-gradle@v4
9294
with:
9395
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
96+
- name: Download prebuilts
97+
uses: actions/download-artifact@v5
98+
with:
99+
artifact-ids: ${{ needs.fetch_prebuilts.outputs.artifact_id }}
100+
path: internal/prebuild-binaries/build/output/
94101
- name: Build frameworks
95-
run: "./gradlew internal:PowerSyncKotlin:buildRelease"
102+
run: "./gradlew -PhasPrebuiltAssets=true internal:PowerSyncKotlin:buildRelease"
96103

97104
- uses: actions/upload-artifact@v4
98105
with:
@@ -105,7 +112,7 @@ jobs:
105112
add_assets:
106113
permissions:
107114
contents: write
108-
needs: [draft_release, build_xcframeworks]
115+
needs: [draft_release, build_xcframeworks, fetch_prebuilts]
109116
name: Add assets to pending release
110117
runs-on: ubuntu-latest
111118
steps:
@@ -123,6 +130,27 @@ jobs:
123130
run: |
124131
gh release upload "${{ needs.draft_release.outputs.tag }}" PowersyncKotlinRelease.zip
125132
133+
- name: Download prebuilts
134+
uses: actions/download-artifact@v5
135+
with:
136+
artifact-ids: ${{ needs.fetch_prebuilts.outputs.artifact_id }}
137+
path: internal/prebuild-binaries/build/output/
138+
139+
- name: Archive prebuilts
140+
run: |
141+
find internal/prebuild-binaries/build/output
142+
zip -r prebuilt_libraries.zip internal/prebuild-binaries/build/output/
143+
144+
- run: "ls -al"
145+
- name: Upload XCFramework
146+
env:
147+
GH_TOKEN: ${{ github.token }}
148+
GH_REPO: ${{ github.repository }}
149+
run: |
150+
gh release upload "${{ needs.draft_release.outputs.tag }}" PowersyncKotlinRelease.zip
151+
gh release upload "${{ needs.draft_release.outputs.tag }}" prebuilt_libraries.zip
152+
153+
126154
- name: "Update release description"
127155
env:
128156
GH_TOKEN: ${{ github.token }}

build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ tasks.getByName<Delete>("clean") {
6767

6868
// Merges individual module docs into a single HTML output
6969
dependencies {
70-
dokka(project(":common:"))
71-
dokka(project(":core:"))
72-
dokka(project(":compose:"))
73-
dokka(project(":integrations:room"))
74-
dokka(project(":integrations:sqldelight"))
75-
dokka(project(":integrations:supabase"))
70+
dokka(projects.common)
71+
dokka(projects.core)
72+
dokka(projects.compose)
73+
dokka(projects.integrations.room)
74+
dokka(projects.integrations.sqldelight)
75+
dokka(projects.integrations.supabase)
7676
}
7777

7878
dokka {

compose/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ kotlin {
2323

2424
sourceSets {
2525
commonMain.dependencies {
26-
api(project(":core"))
26+
api(projects.common)
2727
implementation(compose.runtime)
2828
}
2929
androidMain.dependencies {

integrations/room/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ kotlin {
2626
}
2727

2828
commonMain.dependencies {
29-
api(project(":core"))
29+
api(projects.common)
3030
api(libs.androidx.room.runtime)
3131
api(libs.androidx.sqlite.bundled)
3232

integrations/sqldelight/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ kotlin {
1717

1818
sourceSets {
1919
commonMain.dependencies {
20-
api(projects.core)
20+
api(projects.common)
2121
api(libs.sqldelight.runtime)
2222
implementation(libs.kotlinx.coroutines.core)
2323
}

integrations/supabase/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ kotlin {
2727

2828
sourceSets {
2929
commonMain.dependencies {
30-
api(projects.core)
30+
api(projects.common)
3131
implementation(libs.kotlinx.coroutines.core)
3232
implementation(libs.supabase.client)
3333
api(libs.supabase.auth)

0 commit comments

Comments
 (0)