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 1
1
name : 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 :
3
9
4
10
jobs :
5
11
publish-packages :
9
15
id-token : write # Required for authentication using OIDC
10
16
runs-on : [ubuntu-latest]
11
17
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
4
4
on :
5
5
push :
6
6
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
12
7
- " powersync-v[0-9]+.[0-9]+.[0-9]+"
13
8
14
9
jobs :
40
35
run : |
41
36
tag="${{ github.ref_name }}"
42
37
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
44
39
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:
14
14
changelog : false
15
15
packageFilters :
16
16
noPrivate : true
17
+ publish :
18
+ hooks :
19
+ pre : sh tool/download_binaries.sh
20
+ packageFilters :
21
+ noPrivate : true
17
22
18
23
scripts :
19
24
prepare :
Original file line number Diff line number Diff line change @@ -84,10 +84,11 @@ class PowerSyncOpenFactory extends AbstractPowerSyncOpenFactory {
84
84
case Abi .macosX64:
85
85
return 'libpowersync.dylib' ;
86
86
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' ;
89
90
case Abi .windowsX64:
90
- return 'powersync .dll' ;
91
+ return 'powersync_x64 .dll' ;
91
92
case Abi .androidIA32:
92
93
throw PowersyncNotReadyException (
93
94
'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 {
35
35
case Abi .macosX64:
36
36
return '$path /libpowersync.dylib' ;
37
37
case Abi .linuxX64:
38
+ case Abi .linuxArm64:
38
39
return '$path /libpowersync.so' ;
39
- case Abi .windowsArm64:
40
40
case Abi .windowsX64:
41
41
return '$path /powersync.dll' ;
42
42
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}
23
23
target_link_libraries (${PLUGIN_NAME} PRIVATE flutter )
24
24
25
25
# ----------------------------------------------------------------------
26
- # Download and add powersync prebuilt library.
26
+ # Add powersync prebuilt library.
27
27
28
28
set (POWERSYNC_VERSION 0.1.6 )
29
+ set (CORE_FILE_NAME "libpowersync.so" )
29
30
30
31
set (POWERSYNC_ARCH ${CMAKE_SYSTEM_PROCESSOR} )
31
32
if (${POWERSYNC_ARCH} MATCHES "x86_64" OR ${POWERSYNC_ARCH} MATCHES "AMD64" )
32
- set (POWERSYNC_ARCH x64 )
33
+ set (CORE_FILE_NAME "libpowersync_x64.so" )
33
34
elseif (${POWERSYNC_ARCH} MATCHES "^arm64" OR ${POWERSYNC_ARCH} MATCHES "^armv8" )
34
- set (POWERSYNC_ARCH aarch64 )
35
+ set (CORE_FILE_NAME "libpowersync_aarch64.so" )
35
36
endif ()
36
37
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} " )
43
39
44
40
# ----------------------------------------------------------------------
45
41
Original file line number Diff line number Diff line change @@ -24,23 +24,18 @@ target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}
24
24
target_link_libraries (${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin )
25
25
26
26
# ----------------------------------------------------------------------
27
- # Download and add powersync prebuilt library.
28
-
29
- set (POWERSYNC_VERSION 0.1.6 )
27
+ # Add powersync prebuilt library.
30
28
31
29
set (POWERSYNC_ARCH ${CMAKE_SYSTEM_PROCESSOR} )
30
+ set (CORE_FILE_NAME "powersync.dll" )
31
+
32
32
if (${POWERSYNC_ARCH} MATCHES "x86_64" OR ${POWERSYNC_ARCH} MATCHES "AMD64" )
33
- set (POWERSYNC_ARCH x64 )
33
+ set (CORE_FILE_NAME "powersync_x64.dll" )
34
34
elseif (${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." )
36
36
endif ()
37
37
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" )
44
39
45
40
# ----------------------------------------------------------------------
46
41
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import 'dart:io';
6
6
import 'package:melos/melos.dart' ;
7
7
8
8
final 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 ' ;
10
10
11
11
void main () async {
12
12
final sqliteCoreFilename = getLibraryForPlatform ();
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ -z " $CORE_VERSION " ]; then
4
+ echo " CORE_VERSION is not set" ;
5
+ exit 2;
6
+ fi
7
+
8
+ github=" https://github.com/powersync-ja/powersync-sqlite-core/releases/download/$CORE_VERSION "
9
+
10
+ curl " ${github} /libpowersync_aarch64.so" -o packages/powersync_flutter_libs/linux/libpowersync_aarch64.so --create-dirs -L -f
11
+ curl " ${github} /libpowersync_x64.so" -o packages/powersync_flutter_libs/linux/libpowersync_x64.so --create-dirs -L -f
12
+ curl " ${github} /powersync_x64.dll" -o packages/powersync_flutter_libs/windows/powersync_x64.dll --create-dirs -L -f
You can’t perform that action at this time.
0 commit comments