Skip to content

Commit f03f15a

Browse files
chore: Improve Release Automation (#209)
1 parent 7d86e3d commit f03f15a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Compile Assets and Create Draft Release
44
on:
55
push:
66
tags:
7-
- "powersync-v[0-9]+.[0-9]+.[0-9]+"
7+
- 'powersync-v[0-9]+.[0-9]+.[0-9]+'
88

99
jobs:
1010
build:
@@ -19,8 +19,8 @@ jobs:
1919
- name: Install Flutter
2020
uses: subosito/flutter-action@v2
2121
with:
22-
flutter-version: "3.x"
23-
channel: "stable"
22+
flutter-version: '3.x'
23+
channel: 'stable'
2424

2525
- name: Install Melos
2626
run: flutter pub global activate melos
@@ -34,6 +34,9 @@ jobs:
3434
GH_REPO: ${{ github.repository }}
3535
run: |
3636
tag="${{ github.ref_name }}"
37-
body="Release $tag"
38-
gh release create --draft "$tag" --title "$tag" --notes "$body" --generate-notes
37+
version="${tag#powersync-v}"
38+
changes=$(awk "/## $version/{flag=1;next}/##/{flag=0}flag" packages/powersync/CHANGELOG.md)
39+
body="Release $tag
40+
$changes"
41+
gh release create "$tag" --title "$tag" --notes "$body"
3942
gh release upload "${{ github.ref_name }}" packages/powersync/assets/powersync_db.worker.js packages/powersync/assets/powersync_sync.worker.js

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ git push --follow-tags
2727

2828
**Note: This will launch the `release.yaml` and `publish.yaml` github actions in `.github/workflows`. So only run it when you are absolutely sure you want to release.**
2929

30-
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).
30+
A version bump and tag push for `powersync` will also create a Github release for the PowerSync web workers. Verify the release exists and is published in the [releases](https://github.com/powersync-ja/powersync.dart/releases).

0 commit comments

Comments
 (0)