Skip to content

Commit cac88f6

Browse files
committed
Publish packages based on tag
1 parent bbb0ab1 commit cac88f6

File tree

2 files changed

+38
-22
lines changed

2 files changed

+38
-22
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,59 @@ 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:
16-
name: Publish packages
12+
name: Publish powersync
13+
permissions:
14+
contents: write
15+
id-token: write # Required for authentication using OIDC
16+
runs-on: [ubuntu-latest]
17+
if: contains(github.ref_name, 'powersync-v')
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: dart-lang/setup-dart@v1 # Creates and configures token for publishing
22+
23+
- name: Publish powersync
24+
run: |
25+
dart pub publish --force
26+
working-directory: packages/powersync
27+
28+
publish-powersync_attachments_helper:
29+
name: Publish powersync_attachments_helper
1730
permissions:
1831
contents: write
1932
id-token: write # Required for authentication using OIDC
2033
runs-on: [ubuntu-latest]
34+
if: contains(github.ref_name, 'powersync_attachments_helper-v')
2135
steps:
2236
- uses: actions/checkout@v4
2337

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

26-
- name: Install Flutter
27-
uses: subosito/flutter-action@v2
28-
with:
29-
flutter-version: "3.x"
30-
channel: "stable"
40+
- name: Publish powersync_attachments_helper
41+
run: |
42+
dart pub publish --force
43+
working-directory: packages/powersync_attachments_helper
3144

32-
- name: Install melos
33-
run: flutter pub global activate melos
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
3454

35-
- name: Install dependencies
36-
run: melos bootstrap
55+
- uses: dart-lang/setup-dart@v1 # Creates and configures token for publishing
3756

3857
- name: Set powersync core version
3958
run: echo "CORE_VERSION=v0.1.8" >> $GITHUB_ENV
59+
- name: Download binaries
60+
run: sh tool/download_binaries.sh
4061

41-
- name: Publish packages dry run
42-
run: |
43-
melos publish --yes
44-
45-
- name: Publish packages
62+
- name: Publish powersync_flutter_libs
4663
run: |
47-
melos publish --no-dry-run --yes
64+
dart pub publish --force
65+
working-directory: packages/powersync_flutter_libs

melos.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ command:
1515
packageFilters:
1616
noPrivate: true
1717
publish:
18-
hooks:
19-
pre: sh tool/download_binaries.sh
2018
packageFilters:
2119
noPrivate: true
2220

0 commit comments

Comments
 (0)