Skip to content

Commit f1361ef

Browse files
committed
Use melos publish
1 parent 9123027 commit f1361ef

File tree

3 files changed

+12
-44
lines changed

3 files changed

+12
-44
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,58 +8,21 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
publish-powersync:
12-
name: Publish powersync
11+
publish-packages:
12+
name: Publish packages
1313
permissions:
1414
contents: write
1515
id-token: write # Required for authentication using OIDC
1616
runs-on: [ubuntu-latest]
17-
if: contains(github.ref_name, 'powersync-v')
1817
steps:
1918
- uses: actions/checkout@v4
2019

2120
- uses: dart-lang/setup-dart@v1 # Creates and configures token for publishing
2221

23-
- name: Publish powersync
22+
- name: Publish packages dry run
2423
run: |
25-
dart pub publish --force
26-
working-directory: packages/powersync
24+
melos publish
2725
28-
publish-powersync_attachments_helper:
29-
name: Publish powersync_attachments_helper
30-
permissions:
31-
contents: write
32-
id-token: write # Required for authentication using OIDC
33-
runs-on: [ubuntu-latest]
34-
if: contains(github.ref_name, 'powersync_attachments_helper-v')
35-
steps:
36-
- uses: actions/checkout@v4
37-
38-
- uses: dart-lang/setup-dart@v1 # Creates and configures token for publishing
39-
40-
- name: Publish powersync_attachments_helper
41-
run: |
42-
dart pub publish --force
43-
working-directory: packages/powersync_attachments_helper
44-
45-
publish-powersync_flutter_libs:
46-
name: Publish powersync_flutter_libs
47-
permissions:
48-
contents: write
49-
id-token: write # Required for authentication using OIDC
50-
runs-on: [ubuntu-latest]
51-
if: contains(github.ref_name, 'powersync_flutter_libs-v')
52-
steps:
53-
- uses: actions/checkout@v4
54-
55-
- uses: dart-lang/setup-dart@v1 # Creates and configures token for publishing
56-
57-
- name: Set powersync core version
58-
run: echo "CORE_VERSION=v0.1.8" >> $GITHUB_ENV
59-
- name: Download binaries
60-
run: sh tool/download_binaries.sh
61-
62-
- name: Publish powersync_flutter_libs
26+
- name: Publish packages
6327
run: |
64-
dart pub publish --force
65-
working-directory: packages/powersync_flutter_libs
28+
melos publish --no-dry-run

melos.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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

1823
scripts:
1924
prepare:

tool/download_binaries.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ github="https://github.com/powersync-ja/powersync-sqlite-core/releases/download/
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
12-
curl "${github}/powersync_x64.dll" -o packages/powersync_flutter_libs/windows/powersync.dll --create-dirs -L -f
12+
curl "${github}/powersync_x64.dll" -o packages/powersync_flutter_libs/windows/powersync_x64.dll --create-dirs -L -f

0 commit comments

Comments
 (0)