Skip to content

Commit c8b01ee

Browse files
committed
Merge remote-tracking branch 'origin/main' into rust-sync-client
2 parents 5b513e5 + 2fd1d1a commit c8b01ee

File tree

55 files changed

+1077
-356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1077
-356
lines changed

.github/workflows/deploy.yml

Lines changed: 91 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
1-
name: Deploy to Sonatype
1+
name: Release
22

33
on: workflow_dispatch
44

5-
permissions:
6-
contents: read
7-
85
jobs:
9-
test:
10-
uses: ./.github/workflows/test.yml
11-
deploy:
12-
needs: [test]
6+
draft_release:
7+
permissions:
8+
contents: write
9+
name: Create Draft Release on GitHub
10+
runs-on: ubuntu-latest
11+
outputs:
12+
tag: ${{ steps.tag.outputs.tag }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set tag name
19+
id: tag
20+
run: |
21+
tag=$(basename "${{ github.ref }}")
22+
echo "tag=$tag" >> $GITHUB_OUTPUT
23+
- name: Create Release
24+
env:
25+
GH_TOKEN: ${{ github.token }}
26+
GH_REPO: ${{ github.repository }}
27+
run: |
28+
tag="${{ steps.tag.outputs.tag }}"
29+
body="Pending release for XCFramework, $tag"
30+
gh release create --draft "$tag" --title "$tag" --notes "$body"
31+
32+
maven_publish:
1333
runs-on: macos-latest
1434
steps:
1535
- uses: actions/checkout@v4
@@ -38,17 +58,69 @@ jobs:
3858
-Ppowersync.binaries.allPlatforms="true" \
3959
publishAllPublicationsToSonatypeRepository
4060
shell: bash
41-
# This will change Package.swift in Github packages to direct to new maven central KMMBridge zip file
42-
call-kmmbridge-publish:
43-
needs: deploy
61+
62+
build_xcframeworks:
63+
name: Build XCFrameworks
64+
runs-on: macos-latest
65+
steps:
66+
- uses: actions/checkout@v4
67+
- name: Validate Gradle Wrapper
68+
uses: gradle/wrapper-validation-action@v1
69+
- uses: actions/cache@v3
70+
with:
71+
path: ~/.konan
72+
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
73+
- name: Set up JDK 17
74+
uses: actions/setup-java@v3
75+
with:
76+
java-version: '17'
77+
distribution: 'temurin'
78+
- name: Set up Gradle
79+
uses: gradle/actions/setup-gradle@v4
80+
- name: Build frameworks
81+
run: "./gradlew PowerSyncKotlin:buildRelease"
82+
83+
- uses: actions/upload-artifact@v4
84+
with:
85+
name: XCFramework
86+
retention-days: 1 # Only used temporarily
87+
compression-level: 0 # We're already uploading a compressed file
88+
path: PowerSyncKotlin/build/FrameworkArchives/PowersyncKotlinRelease.zip
89+
if-no-files-found: error
90+
91+
add_assets:
4492
permissions:
4593
contents: write
46-
packages: write
47-
uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildautoversion.yml@v1.2
48-
with:
49-
jvmVersion: 17
50-
versionBaseProperty: LIBRARY_VERSION
51-
publishTask: kmmBridgePublish
52-
secrets:
53-
gradle_params: -PsigningInMemoryKey="${{ secrets.SIGNING_KEY }}" -PsigningInMemoryKeyId="${{ secrets.SIGNING_KEY_ID }}" -PsigningInMemoryKeyPassword="${{ secrets.SIGNING_PASSWORD }}"
94+
needs: [draft_release, build_xcframeworks]
95+
name: Add assets to pending release
96+
runs-on: ubuntu-latest
97+
steps:
98+
- uses: actions/checkout@v4
99+
with:
100+
fetch-depth: 0
101+
- uses: actions/download-artifact@v4
102+
with:
103+
merge-multiple: true
104+
- run: "ls -al"
105+
- name: Upload XCFramework
106+
env:
107+
GH_TOKEN: ${{ github.token }}
108+
GH_REPO: ${{ github.repository }}
109+
run: |
110+
gh release upload "${{ needs.draft_release.outputs.tag }}" PowersyncKotlinRelease.zip
54111
112+
- name: "Update release description"
113+
env:
114+
GH_TOKEN: ${{ github.token }}
115+
GH_REPO: ${{ github.repository }}
116+
shell: bash
117+
run: |
118+
checksums=$(sha256sum PowersyncKotlinRelease.zip)
119+
cat > RELEASE_NOTES <<- NOTES_END
120+
File hashes:
121+
\`\`\`
122+
$checksums
123+
\`\`\`
124+
NOTES_END
125+
126+
gh release edit "${{ needs.draft_release.outputs.tag }}" -F RELEASE_NOTES

.github/workflows/docs-deploy.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [ 'main' ]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Validate Gradle Wrapper
18+
uses: gradle/wrapper-validation-action@v1
19+
- uses: actions/cache@v3
20+
with:
21+
path: ~/.konan
22+
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
23+
- name: Set up JDK 17
24+
uses: actions/setup-java@v3
25+
with:
26+
java-version: '17'
27+
distribution: 'temurin'
28+
- name: Set up Gradle
29+
uses: gradle/actions/setup-gradle@v4
30+
- name: Build Docs
31+
run: |
32+
./gradlew \
33+
-PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} \
34+
dokkaGenerate
35+
shell: bash
36+
- name: Upload static files as artifact
37+
id: deployment
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: build/dokka/html
41+
42+
# Deployment job
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
11
# Changelog
22

3-
## unreleased
3+
## 1.1.0
44

5+
* Add `trackPreviousValues` option on `Table` which sets `CrudEntry.previousValues` to previous values on updates.
6+
* Add `trackMetadata` option on `Table` which adds a `_metadata` column that can be used for updates.
7+
The configured metadata is available through `CrudEntry.metadata`.
8+
* Add `ignoreEmptyUpdates` option which skips creating CRUD entries for updates that don't change any values.
9+
10+
## 1.0.1
11+
12+
* [Internal] Version bump for broken Swift release pipeline
13+
14+
## 1.0.0
15+
16+
* Bump SDK to V1/Stable feature status
17+
* Fixed `CrudBatch` `hasMore` always returning false.
18+
* Added `triggerImmediately` to `onChange` method.
519
* Report real-time progress information about downloads through `SyncStatus.downloadProgress`.
620
* Compose: Add `composeState()` extension method on `SyncStatus`.
21+
* [Internal] Added helper method for Swift `PowerSyncException` throwing.
22+
23+
## 1.0.0-BETA32
24+
25+
* Added `onChange` method to the PowerSync client. This allows for observing table changes.
26+
* Removed unnecessary `User-Id` header from internal PowerSync service requests.
27+
* Fix loading native PowerSync extension for Java targets.
728

829
## 1.0.0-BETA31
930

Package.swift

Lines changed: 0 additions & 24 deletions
This file was deleted.

PowerSyncKotlin/Package.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// swift-tools-version: 5.7
2+
3+
// NOTE! This is never released, we're only using this to support local Kotlin SDK builds for the
4+
// Swift SDK.
5+
import PackageDescription
6+
let packageName = "PowerSyncKotlin"
7+
8+
let package = Package(
9+
name: packageName,
10+
platforms: [
11+
.iOS(.v13),
12+
.macOS(.v10_15)
13+
],
14+
products: [
15+
.library(
16+
name: packageName,
17+
targets: [packageName]),
18+
],
19+
targets: [
20+
.binaryTarget(
21+
name: packageName,
22+
path: "build/XCFrameworks/debug/PowerSyncKotlin.xcframework"
23+
)
24+
]
25+
)

0 commit comments

Comments
 (0)