Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Build iOS & macOS xcframework
run: |
./build-pod.sh
./tool/build_xcframework.sh

- name: Lint pod
run: |
Expand Down
32 changes: 30 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}

publish_ios_pod:
publish_ios_pod_and_spm_package:
name: Publish iOS
needs: [draft_release]
runs-on: macos-latest
Expand All @@ -100,18 +100,46 @@ jobs:

- name: Build iOS & macOS xcframework
run: |
./build-pod.sh
.tool/build_xcframework.sh

- name: Lint pod
run: |
pod lib lint

- name: Set xcFramework file name used for SPM package
id: fileName
run: |
FILENAME=powersync-sqlite-core.xcframework.zip
echo "fileName=$FILENAME" >> $GITHUB_OUTPUT

- name: Upload xcframework
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release upload "${{ needs.draft_release.outputs.tag }}" powersync-sqlite-core.xcframework.tar.xz
gh release upload "${{ needs.draft_release.outputs.tag }}" ${{ steps.fileName.outputs.fileName }}

# For SPM package
- name: Generate and add checksum to output
id: checksum
run: |
CHECKSUM=$(swift package compute-checksum ${{ steps.fileName.outputs.fileName }})
echo "checksum=$CHECKSUM" >> $GITHUB_OUTPUT
- name: Dispatch release to SPM package
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.SWIFT_PUBLISH_TOKEN }}
repository: powersync-ja/powersync-sqlite-core-swift
event-type: spm-release
client-payload: |-
{
"repository": "${{ github.repository }}",
"title": "${{ needs.draft_release.outputs.tag }}",
"tag": "${{ needs.draft_release.outputs.tag }}",
"checksum": "${{ steps.checksum.outputs.checksum }}"
"fileName": "${{ steps.fileName.outputs.fileName }}"
}

publish_linux_x86_64:
name: Publish Linux x86_64
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ target/
*.xcframework
*.tar.gz
*.tar.xz
*.zip
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Bump the version number in these places:
2. powersync-sqlite-core.podspec.
3. android/build.gradle.kts
4. android/src/prefab/prefab.json
5. build-pod.sh - CFBundleVersion and CFBundleShortVersionString.
5. tool/build_xcframework.sh - CFBundleVersion and CFBundleShortVersionString.
6. `cargo build` to update Cargo.lock

Create a tag:
Expand Down
2 changes: 2 additions & 0 deletions build-pod.sh → tool/build_xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ EOF

cp -Rf "${BUILD_DIR}/powersync-sqlite-core.xcframework" "powersync-sqlite-core.xcframework"
tar -cJvf powersync-sqlite-core.xcframework.tar.xz powersync-sqlite-core.xcframework LICENSE README.md
# swift command used for checksum required for SPM package does not support xz so need to create a zip file
zip -r powersync-sqlite-core.xcframework.zip powersync-sqlite-core.xcframework LICENSE README.md
rm -rf ${BUILD_DIR}
}

Expand Down
Loading