diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 322da95..a59cbcf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,9 +2,8 @@ name: Release on: workflow_dispatch: - push: - tags: - - "*.*.*" + release: + types: [published] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -31,6 +30,20 @@ jobs: with: persist-credentials: false + # release events can't be filtered by tag in `on:`, so gate here: abort + # unless the release tag is a X.Y.Z version (optionally with a -prerelease + # suffix). Skipped for manual workflow_dispatch runs. + - name: Validate release tag is a version + if: github.event_name == 'release' + env: + TAG: ${{ github.event.release.tag_name }} + run: | + if [[ ! "$TAG" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$ ]]; then + echo "::error::Release tag '$TAG' is not a X.Y.Z version. Aborting." + exit 1 + fi + echo "Release tag '$TAG' OK." + - name: Set up Dart for pub.dev OIDC uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1.7.2 @@ -60,14 +73,8 @@ jobs: run: make pub-publish-dry-run - name: Publish to pub.dev - if: github.event_name == 'push' && github.ref_type == 'tag' - env: - PUB_PUBLISH_ENABLED: ${{ vars.PUB_PUBLISH_ENABLED }} + if: github.event_name == 'release' run: | - # Fail-safe: publishing is irreversible, so it's gated on PUB_PUBLISH_ENABLED. - # First resolve the pub.dev name (taken; latest 0.0.7), bump version, drop publish_to: none. - if [ "$PUB_PUBLISH_ENABLED" != "true" ]; then - echo "::notice::Publish skipped — set repository variable PUB_PUBLISH_ENABLED=true to enable (see prerequisites in release.yml)." - exit 0 - fi + # Prereqs: the release's tag matches the pubspec version, and pub.dev + # automated publishing is configured to trust this repo + workflow. make pub-publish-force diff --git a/packages/formbricks/CHANGELOG.md b/packages/formbricks/CHANGELOG.md index 3316528..ea110dd 100644 --- a/packages/formbricks/CHANGELOG.md +++ b/packages/formbricks/CHANGELOG.md @@ -1,8 +1,14 @@ # Changelog -## 0.0.1 +## 0.1.0 -- Establishes the Flutter SDK package and monorepo wiring. -- Adds `Formbricks.setup(...)` with persisted workspace/user state. -- Adds `Formbricks.track(...)` for code-action tracking. -- Renders targeted in-app surveys through a hardened WebView host. +First beta release. + +- `Formbricks.setup(...)` — initialize against a workspace, with persisted + config, lifecycle-aware expiry refresh, and error-state cooldown. +- `Formbricks.track(...)` — code-action tracking. +- User identification — `setUserId`, `setAttribute` / `setAttributes`, + `setLanguage`, and `logout`, with debounced, coalesced backend sync. +- Survey eligibility filtering — `displayOption`, `recontactDays`, + `displayLimit`, segment targeting, and the `displayPercentage` gate. +- Targeted in-app surveys rendered through a hardened WebView host. diff --git a/packages/formbricks/pubspec.yaml b/packages/formbricks/pubspec.yaml index 583ecf1..399c3d9 100644 --- a/packages/formbricks/pubspec.yaml +++ b/packages/formbricks/pubspec.yaml @@ -2,14 +2,11 @@ name: formbricks description: >- Formbricks Flutter SDK — connect your Flutter app to Formbricks, identify users, track actions, and render targeted in-app surveys. -version: 0.0.1 +version: 0.1.0 homepage: https://formbricks.com repository: https://github.com/formbricks/flutter issue_tracker: https://github.com/formbricks/flutter/issues -# Not published to pub.dev yet — publish_to is disabled until the first release. -publish_to: none - # Part of the root pub workspace — shares the root lockfile + analysis config. resolution: workspace