Skip to content

Commit 90d303c

Browse files
authored
Merge pull request #146 from powersync-ja/fix/automated-publishing
Publish packages based on tags
2 parents 80fa933 + be565d2 commit 90d303c

File tree

5 files changed

+38
-21
lines changed

5 files changed

+38
-21
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
- "powersync_flutter_libs-v[0-9]+.[0-9]+.[0-9]+*"
88
workflow_dispatch:
99

10-
concurrency:
11-
group: ${{ github.workflow }}
12-
cancel-in-progress: false
13-
1410
jobs:
1511
publish-packages:
1612
name: Publish packages
@@ -35,13 +31,18 @@ jobs:
3531
- name: Install dependencies
3632
run: melos bootstrap
3733

38-
- name: Set powersync core version
39-
run: echo "CORE_VERSION=v0.1.8" >> $GITHUB_ENV
34+
- name: Get package name from tag
35+
env:
36+
GITHUBREF: ${{ github.ref }}
37+
run: |
38+
PACKAGE_NAME=$(sed -E 's/refs\/tags\/([a-z0-9_]+)-v([0-9]+\.[0-9]+\.[0-9]+)/\1/' <<< $GITHUBREF) && \
39+
echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_ENV
40+
echo "Package name: $PACKAGE_NAME"
4041
4142
- name: Publish packages dry run
4243
run: |
43-
melos publish --yes
44+
melos publish --yes --scope=$PACKAGE_NAME
4445
4546
- name: Publish packages
4647
run: |
47-
melos publish --no-dry-run --yes
48+
melos publish --no-dry-run --yes --scope=$PACKAGE_NAME

melos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ command:
1616
noPrivate: true
1717
publish:
1818
hooks:
19-
pre: sh tool/download_binaries.sh
19+
pre: sh tool/download_binaries.sh v0.1.8 # Download latest core binaries when publishing
2020
packageFilters:
2121
noPrivate: true
2222

pubspec.lock

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ packages:
7373
url: "https://pub.dev"
7474
source: hosted
7575
version: "0.4.1"
76+
clock:
77+
dependency: transitive
78+
description:
79+
name: clock
80+
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
81+
url: "https://pub.dev"
82+
source: hosted
83+
version: "1.1.1"
7684
collection:
7785
dependency: transitive
7886
description:
@@ -117,10 +125,10 @@ packages:
117125
dependency: transitive
118126
description:
119127
name: file
120-
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
128+
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
121129
url: "https://pub.dev"
122130
source: hosted
123-
version: "6.1.4"
131+
version: "7.0.0"
124132
frontend_server_client:
125133
dependency: transitive
126134
description:
@@ -169,6 +177,14 @@ packages:
169177
url: "https://pub.dev"
170178
source: hosted
171179
version: "4.0.2"
180+
intl:
181+
dependency: transitive
182+
description:
183+
name: intl
184+
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
185+
url: "https://pub.dev"
186+
source: hosted
187+
version: "0.19.0"
172188
io:
173189
dependency: transitive
174190
description:
@@ -221,10 +237,10 @@ packages:
221237
dependency: "direct dev"
222238
description:
223239
name: melos
224-
sha256: "96e64bbade5712c3f010137e195bca9f1b351fac34ab1f322af492ae34032067"
240+
sha256: a3f06ed871e0348cb99909ad5ddf5f8b53cc61d894c302b5417d2db1ee7ec381
225241
url: "https://pub.dev"
226242
source: hosted
227-
version: "3.4.0"
243+
version: "6.1.0"
228244
meta:
229245
dependency: transitive
230246
description:
@@ -293,10 +309,10 @@ packages:
293309
dependency: transitive
294310
description:
295311
name: process
296-
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
312+
sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32"
297313
url: "https://pub.dev"
298314
source: hosted
299-
version: "4.2.4"
315+
version: "5.0.2"
300316
prompts:
301317
dependency: transitive
302318
description:
@@ -317,10 +333,10 @@ packages:
317333
dependency: transitive
318334
description:
319335
name: pub_updater
320-
sha256: b06600619c8c219065a548f8f7c192b3e080beff95488ed692780f48f69c0625
336+
sha256: "54e8dc865349059ebe7f163d6acce7c89eb958b8047e6d6e80ce93b13d7c9e60"
321337
url: "https://pub.dev"
322338
source: hosted
323-
version: "0.3.1"
339+
version: "0.4.0"
324340
pubspec:
325341
dependency: transitive
326342
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ environment:
99

1010
dev_dependencies:
1111
lints: ^2.1.1
12-
melos: ^3.4.0
12+
melos: ^6.1.0
1313
test: ^1.25.0
1414
path: ^1.0.0

tool/download_binaries.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

3-
if [ -z "$CORE_VERSION" ]; then
4-
echo "CORE_VERSION is not set";
3+
if [ -z "$1" ]; then
4+
echo "Core version is not set";
55
exit 2;
66
fi
77

8-
github="https://github.com/powersync-ja/powersync-sqlite-core/releases/download/$CORE_VERSION"
8+
github="https://github.com/powersync-ja/powersync-sqlite-core/releases/download/$1"
99

1010
curl "${github}/libpowersync_aarch64.so" -o packages/powersync_flutter_libs/linux/libpowersync_aarch64.so --create-dirs -L -f
1111
curl "${github}/libpowersync_x64.so" -o packages/powersync_flutter_libs/linux/libpowersync_x64.so --create-dirs -L -f

0 commit comments

Comments
 (0)