Skip to content

chore: Improve Release Automation #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Compile Assets and Create Draft Release
on:
push:
tags:
- "powersync-v[0-9]+.[0-9]+.[0-9]+"
- 'powersync-v[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
Expand All @@ -19,8 +19,8 @@ jobs:
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: "stable"
flutter-version: '3.x'
channel: 'stable'

- name: Install Melos
run: flutter pub global activate melos
Expand All @@ -34,6 +34,9 @@ jobs:
GH_REPO: ${{ github.repository }}
run: |
tag="${{ github.ref_name }}"
body="Release $tag"
gh release create --draft "$tag" --title "$tag" --notes "$body" --generate-notes
version="${tag#powersync-v}"
changes=$(awk "/## $version/{flag=1;next}/##/{flag=0}flag" packages/powersync/CHANGELOG.md)
body="Release $tag
$changes"
gh release create "$tag" --title "$tag" --notes "$body"
gh release upload "${{ github.ref_name }}" packages/powersync/assets/powersync_db.worker.js packages/powersync/assets/powersync_sync.worker.js
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ git push --follow-tags

**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.**

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).
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).
Loading