File tree Expand file tree Collapse file tree 11 files changed +87
-183
lines changed
lib/src/open_factory/native Expand file tree Collapse file tree 11 files changed +87
-183
lines changed Original file line number Diff line number Diff line change 11name : Publish packages
2- on : workflow_dispatch
2+ on :
3+ push :
4+ tags :
5+ - " powersync-v[0-9]+.[0-9]+.[0-9]+"
6+ - " powersync_attachments_helper-v[0-9]+.[0-9]+.[0-9]+*"
7+ - " powersync_flutter_libs-v[0-9]+.[0-9]+.[0-9]+*"
8+ workflow_dispatch :
39
410jobs :
511 publish-packages :
915 id-token : write # Required for authentication using OIDC
1016 runs-on : [ubuntu-latest]
1117 steps :
12- - uses : actions/checkout@v3
13- - uses : subosito/flutter-action@v2
14- with :
15- flutter-version : ' 3.x'
16- channel : ' stable'
17- - uses : bluefireteam/melos-action@v3
18- with :
19- publish : true
18+ - uses : actions/checkout@v4
19+
20+ - uses : dart-lang/setup-dart@v1 # Creates and configures token for publishing
21+
22+ - name : Install melos
23+ run : dart pub global activate melos
24+
25+ - name : Set powersync core version
26+ run : echo "CORE_VERSION=v0.1.8" >> $GITHUB_ENV
27+
28+ - name : Publish packages dry run
29+ run : |
30+ melos publish
31+
32+ - name : Publish packages
33+ run : |
34+ melos publish --no-dry-run
Original file line number Diff line number Diff line change @@ -4,11 +4,6 @@ name: Compile Assets and Create Draft Release
44on :
55 push :
66 tags :
7- # Trigger on tags beginning with 'v'
8- # Note that `melos version ...` adds the package name as a suffix
9- # This action is not compatible with tags such as `powersync-v1.1.1`
10- # marvinpinto/action-automatic-releases struggles to generate changelogs
11- # Be sure to manually tag the commit to trigger this action
127 - " powersync-v[0-9]+.[0-9]+.[0-9]+"
138
149jobs :
4035 run : |
4136 tag="${{ github.ref_name }}"
4237 body="Release $tag"
43- gh release create --draft "$tag" --title "$tag" --notes "$body" --generate-notes --prerelease
38+ gh release create --draft "$tag" --title "$tag" --notes "$body" --generate-notes
4439 gh release upload "${{ github.ref_name }}" packages/powersync/assets/powersync_db.worker.js
Original file line number Diff line number Diff line change 1+ # Preparing Release
2+
3+ Bump the version of the packages to be released using ` melos ` :
4+
5+ ```
6+ melos version
7+ ```
8+
9+ if melos does not pick up changes or does not bump the version correctly, you can manually version the packages using
10+
11+ ```
12+ melos version -V ${PACKAGE_NAME}:M.M.P
13+ for e.g melos version -V powersync:1.6.3
14+ ```
15+
16+ This will create a tag for all packages updated in the format of ${PACKAGE_NAME}-vM.M.P
17+
18+ ```
19+ e.g powersync-v1.6.4, powersync_attachments_helper-v0.6.3+1, etc.
20+ ```
21+
22+ # Perform Release
23+
24+ ```
25+ git push --follow-tags
26+ ```
27+
28+ A version bump and tag push for ` powersync ` will also create a draft github release for the powersync web worker. The worker needs to be manually published in the GitHub [ releases] ( https://github.com/powersync-ja/powersync.dart/releases ) .
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ command:
1414 changelog : false
1515 packageFilters :
1616 noPrivate : true
17+ publish :
18+ hooks :
19+ pre : sh tool/download_binaries.sh
20+ packageFilters :
21+ noPrivate : true
1722
1823scripts :
1924 prepare :
Original file line number Diff line number Diff line change @@ -84,10 +84,11 @@ class PowerSyncOpenFactory extends AbstractPowerSyncOpenFactory {
8484 case Abi .macosX64:
8585 return 'libpowersync.dylib' ;
8686 case Abi .linuxX64:
87- return 'libpowersync.so' ;
88- case Abi .windowsArm64:
87+ return 'libpowersync_x64.so' ;
88+ case Abi .linuxArm64:
89+ return 'libpowersync_aarch64.so' ;
8990 case Abi .windowsX64:
90- return 'powersync .dll' ;
91+ return 'powersync_x64 .dll' ;
9192 case Abi .androidIA32:
9293 throw PowersyncNotReadyException (
9394 'Unsupported processor architecture. X86 Android emulators are not '
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ class TestOpenFactory extends PowerSyncOpenFactory {
3535 case Abi .macosX64:
3636 return '$path /libpowersync.dylib' ;
3737 case Abi .linuxX64:
38+ case Abi .linuxArm64:
3839 return '$path /libpowersync.so' ;
39- case Abi .windowsArm64:
4040 case Abi .windowsX64:
4141 return '$path /powersync.dll' ;
4242 case Abi .androidIA32:
Original file line number Diff line number Diff line change @@ -23,23 +23,19 @@ target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}
2323target_link_libraries (${PLUGIN_NAME} PRIVATE flutter)
2424
2525# ----------------------------------------------------------------------
26- # Download and add powersync prebuilt library.
26+ # Add powersync prebuilt library.
2727
2828set (POWERSYNC_VERSION 0.1.6)
29+ set (CORE_FILE_NAME "libpowersync.so" )
2930
3031set (POWERSYNC_ARCH ${CMAKE_SYSTEM_PROCESSOR} )
3132if (${POWERSYNC_ARCH} MATCHES "x86_64" OR ${POWERSYNC_ARCH} MATCHES "AMD64" )
32- set (POWERSYNC_ARCH x64 )
33+ set (CORE_FILE_NAME "libpowersync_x64.so" )
3334elseif (${POWERSYNC_ARCH} MATCHES "^arm64" OR ${POWERSYNC_ARCH} MATCHES "^armv8" )
34- set (POWERSYNC_ARCH aarch64 )
35+ set (CORE_FILE_NAME "libpowersync_aarch64.so" )
3536endif ()
3637
37- set (POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /libpowersync.so" )
38-
39- file (DOWNLOAD
40- "https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v${POWERSYNC_VERSION} /libpowersync_${POWERSYNC_ARCH} .so"
41- ${POWERSYNC_FILE_PATH}
42- )
38+ set (POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /${CORE_FILE_NAME} " )
4339
4440# ----------------------------------------------------------------------
4541
Original file line number Diff line number Diff line change @@ -24,23 +24,18 @@ target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}
2424target_link_libraries (${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin)
2525
2626# ----------------------------------------------------------------------
27- # Download and add powersync prebuilt library.
28-
29- set (POWERSYNC_VERSION 0.1.6)
27+ # Add powersync prebuilt library.
3028
3129set (POWERSYNC_ARCH ${CMAKE_SYSTEM_PROCESSOR} )
30+ set (CORE_FILE_NAME "powersync.dll" )
31+
3232if (${POWERSYNC_ARCH} MATCHES "x86_64" OR ${POWERSYNC_ARCH} MATCHES "AMD64" )
33- set (POWERSYNC_ARCH x64 )
33+ set (CORE_FILE_NAME "powersync_x64.dll" )
3434elseif (${POWERSYNC_ARCH} MATCHES "^arm64" OR ${POWERSYNC_ARCH} MATCHES "^armv8" )
35- set ( POWERSYNC_ARCH aarch64 )
35+ message (FATAL_ERROR "Unsupported architecture: ${ POWERSYNC_ARCH} , we are working on adding support for windows arm." )
3636endif ()
3737
38- set (POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /powersync.dll" )
39-
40- file (DOWNLOAD
41- "https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v${POWERSYNC_VERSION} /powersync_${POWERSYNC_ARCH} .dll"
42- ${POWERSYNC_FILE_PATH}
43- )
38+ set (POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /powersync_x64.dll" )
4439
4540# ----------------------------------------------------------------------
4641
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import 'dart:io';
66import 'package:melos/melos.dart' ;
77
88final sqliteUrl =
9- 'https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v0.1.7 ' ;
9+ 'https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v0.1.8 ' ;
1010
1111void main () async {
1212 final sqliteCoreFilename = getLibraryForPlatform ();
You can’t perform that action at this time.
0 commit comments