Skip to content

Commit 07121f8

Browse files
committed
Publish packages based on tags
1 parent 7a8020e commit 07121f8

File tree

1 file changed

+44
-6
lines changed

1 file changed

+44
-6
lines changed

.github/workflows/publish.yml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ on:
33
push:
44
tags:
55
- "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]+"
68
workflow_dispatch:
79

810
jobs:
9-
publish-packages:
10-
name: Publish packages
11+
publish-powersync:
12+
name: Publish powersync
1113
permissions:
1214
contents: write
1315
id-token: write # Required for authentication using OIDC
1416
runs-on: [ubuntu-latest]
17+
if: contains(github.ref_name, 'powersync-v')
1518
steps:
1619
- uses: actions/checkout@v4
1720

@@ -21,18 +24,53 @@ jobs:
2124
flutter-version: "3.x"
2225
channel: "stable"
2326

24-
- name: Set powersync core version
25-
run: echo "CORE_VERSION=v0.1.8" >> $GITHUB_ENV
26-
- name: Download binaries
27-
run: sh tool/download_binaries.sh
2827
- name: Publish powersync
2928
run: |
3029
dart pub publish --force
3130
working-directory: packages/powersync
31+
32+
publish-powersync_attachments_helper:
33+
name: Publish powersync_attachments_helper
34+
permissions:
35+
contents: write
36+
id-token: write # Required for authentication using OIDC
37+
runs-on: [ubuntu-latest]
38+
if: contains(github.ref_name, 'powersync_attachments_helper-v')
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Install Flutter
43+
uses: subosito/flutter-action@v2
44+
with:
45+
flutter-version: "3.x"
46+
channel: "stable"
47+
3248
- name: Publish powersync_attachments_helper
3349
run: |
3450
dart pub publish --force
3551
working-directory: packages/powersync_attachments_helper
52+
53+
publish-powersync_flutter_libs:
54+
name: Publish powersync_flutter_libs
55+
permissions:
56+
contents: write
57+
id-token: write # Required for authentication using OIDC
58+
runs-on: [ubuntu-latest]
59+
if: contains(github.ref_name, 'powersync_attachments_helper-v')
60+
steps:
61+
- uses: actions/checkout@v4
62+
63+
- name: Install Flutter
64+
uses: subosito/flutter-action@v2
65+
with:
66+
flutter-version: "3.x"
67+
channel: "stable"
68+
69+
- name: Set powersync core version
70+
run: echo "CORE_VERSION=v0.1.8" >> $GITHUB_ENV
71+
- name: Download binaries
72+
run: sh tool/download_binaries.sh
73+
3674
- name: Publish powersync_flutter_libs
3775
run: |
3876
dart pub publish --force

0 commit comments

Comments
 (0)