diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 6c204ad..a0e8716 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -38,7 +38,7 @@ jobs: - build-ios - build-web name: Notify GChat - uses: ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@88d0e118869cc788aae18ba37635fa851c879b73 # main + uses: ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@490d3ec9069eeedb757be147bf440d6394705e84 # main permissions: contents: read id-token: write diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index bb26ae9..6d15b0b 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -22,9 +22,13 @@ permissions: jobs: publish-draft-release: + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + fetch-depth: 0 + persist-credentials: false - name: Get current version id: version-file @@ -39,18 +43,22 @@ jobs: current_version: ${{ steps.version-file.outputs.release-version }} level: ${{ github.event.inputs.bump-type || 'patch' }} - - name: Save validated version to file - run: | - echo "${{ steps.bump-version.outputs.new_version }}" > VERSION - - - name: Update changelog - uses: thomaseizinger/keep-a-changelog-new-release@f62c3c390716df5af712ba5d94f4f4a8efc1306d # v3 + - name: Generate changelog from merged PR titles + id: changelog + uses: ROKT/rokt-workflows/actions/generate-changelog@da0c5fd5d38e9cf113a24ec9aaea079cc7d0bc40 # main + env: + GH_TOKEN: ${{ github.token }} with: - tag: ${{ steps.bump-version.outputs.new_version }} + version: ${{ steps.bump-version.outputs.new_version }} + tag-prefix: v + changelog-path: CHANGELOG.md - - name: Update pubspec.yaml + - name: Update release versions + env: + NEW_VERSION: ${{ steps.bump-version.outputs.new_version }} run: | - sed -i 's/version: .*/version: ${{ steps.bump-version.outputs.new_version }}/' pubspec.yaml + printf '%s\n' "$NEW_VERSION" > VERSION + sed -i "s/^version: .*/version: ${NEW_VERSION}/" pubspec.yaml - name: Setup Flutter uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 @@ -84,5 +92,8 @@ jobs: - Updated CHANGELOG.md - Updated VERSION file - Ran a dry-run publish + + ## Changelog + ${{ steps.changelog.outputs.release-notes }} labels: | release diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 649bd7e..b08003f 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -46,20 +46,29 @@ jobs: channel: stable cache: true - - name: Publish Package - run: | - flutter pub publish --force - - uses: ffurrer2/extract-release-notes@273da39a24fb7db106a35526c8162815faffd31d # v3.1.0 id: extract-release-notes with: changelog_file: CHANGELOG.md + - name: Prepare GitHub release body + env: + TAG_NAME: ${{ github.ref_name }} + RELEASE_NOTES: ${{ steps.extract-release-notes.outputs.release_notes }} + BODY_FILE: ${{ runner.temp }}/release-body.md + run: | + version="${TAG_NAME#v}" + test "$(head -n 1 VERSION)" = "$version" + comparison_url=$(awk -v reference="[${version}]:" '$1 == reference { matches++; url=$2 } END { if (matches != 1 || url == "") exit 1; print url }' CHANGELOG.md) + printf '## Release notes:\n%s\n\n**Full Changelog**: %s\n' "$RELEASE_NOTES" "$comparison_url" > "$BODY_FILE" + + - name: Publish Package + run: | + flutter pub publish --force + - name: Create Github release uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1 with: makeLatest: true tag: ${{ github.ref_name }} - body: | - ## Release notes: - ${{ steps.extract-release-notes.outputs.release_notes }} + bodyFile: ${{ runner.temp }}/release-body.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 252c377..e9df746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,18 +28,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [2.2.0] - 2026-07-27 -### Changed - -- Make `android-rokt-kit` a `compileOnly` plugin dependency and guard Android Rokt registration behind a runtime classpath check, matching the optional Rokt kit pattern used in react-native-mparticle. - -## [2.2.0] - 2026-07-22 - ### Added - Add Swift Package Manager support for the iOS plugin (`ios/mparticle_flutter_sdk/Package.swift`). ### Changed +- Make `android-rokt-kit` a `compileOnly` plugin dependency and guard Android Rokt registration behind a runtime classpath check, matching the optional Rokt kit pattern used in react-native-mparticle. - Bump iOS CocoaPods dependency from `mParticle-Apple-SDK ~> 9.2` to `~> 9.3`. - Bump Android Gradle dependencies to `android-core:6.0.0` and `android-rokt-kit:6.0.0`. - **BREAKING**: Android `minSdkVersion` raised from `16` to `23` (required by Rokt SDK 6.x transitive dependencies). @@ -102,7 +97,7 @@ See [MIGRATING.md](./MIGRATING.md) for the full 1.x → 2.0 upgrade guide. - fix: Resolve linting issues (#48) -## [1.0.5] - 2024-07-10 +## 1.0.5 - 2024-07-10 - fix: type 'Null' is not a subtype of type 'String' in getCurrentUser (#46) @@ -144,10 +139,21 @@ See [MIGRATING.md](./MIGRATING.md) for the full 1.x → 2.0 upgrade guide. - Identity API (identify, login, logout, and alias) - Github Actions - semantic PR title check; plugin building -[unreleased]: https://github.com/mParticle/mparticle-flutter-sdk/compare/2.3.0...HEAD -[2.3.0]: https://github.com/mParticle/mparticle-flutter-sdk/compare/2.2.1...2.3.0 -[2.2.1]: https://github.com/mParticle/mparticle-flutter-sdk/compare/2.2.0...2.2.1 -[2.2.0]: https://github.com/mParticle/mparticle-flutter-sdk/compare/2.1.0...2.2.0 -[2.1.0]: https://github.com/mParticle/mparticle-flutter-sdk/compare/2.0.0...2.1.0 -[2.0.0]: https://github.com/mParticle/mparticle-flutter-sdk/compare/1.1.2...2.0.0 -[1.1.2]: https://github.com/mParticle/mparticle-flutter-sdk/compare/47676b23d065e77f8ef7c9e2938793a93ec6dcc6...1.1.2 +[unreleased]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v2.3.0...HEAD +[2.3.0]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v2.2.1...v2.3.0 +[2.2.1]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v2.2.0...v2.2.1 +[2.2.0]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v2.1.0...v2.2.0 +[2.1.0]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v2.0.0...v2.1.0 +[2.0.0]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v1.1.2...v2.0.0 +[1.1.2]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v1.1.1...v1.1.2 +[1.1.1]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v1.1.0...v1.1.1 +[1.1.0]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v1.0.6...v1.1.0 +[1.0.6]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v1.0.4...v1.0.6 +[1.0.4]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v1.0.3...v1.0.4 +[1.0.3]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v1.0.2...v1.0.3 +[1.0.2]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v1.0.1...v1.0.2 +[1.0.1]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v1.0.0-beta.1...v1.0.1 +[1.0.0-beta.1]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v0.2.0-alpha.1...v1.0.0-beta.1 +[0.2.0-alpha.1]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v0.1.0-alpha.2...v0.2.0-alpha.1 +[0.1.0-alpha.2]: https://github.com/mParticle/mparticle-flutter-sdk/compare/v0.1.0-alpha.1...v0.1.0-alpha.2 +[0.1.0-alpha.1]: https://github.com/mParticle/mparticle-flutter-sdk/tree/v0.1.0-alpha.1 diff --git a/MIGRATING.md b/MIGRATING.md index b2424c5..b0eecd4 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -14,7 +14,7 @@ CocoaPods trunk becomes read-only on 2 December 2026, and Flutter uses Swift Pac 2. Remove every mParticle and Rokt pod from `ios/Podfile`, for example `mParticle-Apple-SDK`, `mParticle-Rokt`, `RoktPaymentExtension` and `RoktSDKPlus`. - If nothing else is left in the Podfile, run `pod deintegrate` in `ios/`, delete `Podfile` and `Podfile.lock`, and remove the `Pods-Runner` includes from `ios/Flutter/Debug.xcconfig` and `ios/Flutter/Release.xcconfig`. - Otherwise, run `pod install`. -3. Add the kits as Swift packages to the Runner target, as described in the iOS section of the [README](README.md#iOS). +3. Add the kits as Swift packages to the Runner target, as described in the iOS section of the [README](README.md#ios). 4. Run a Debug build once and check the console for `[mParticle] The mParticle SDK is loaded more than once`. If it appears, a pod still brings in the SDK. 5. Commit the Xcode project change and `ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved`. diff --git a/README.md b/README.md index 0572254..a088d8f 100644 --- a/README.md +++ b/README.md @@ -317,7 +317,7 @@ For more help, see the [full Web set up docs](https://docs.mparticle.com/develop ## Usage -Each of our Dart methods is mapped to an underlying mParticle SDK at the platform level. Note that per Dart's [documentation](https://flutter.dev/docs/development/platform-integration/platform-channels#architecture, calling into platform specific code is asynchronous to ensure the user interface remains responsive. In your code, you can swap usage between `async` and `then` in accordance to your app's requirements. +Each of our Dart methods is mapped to an underlying mParticle SDK at the platform level. Note that per Dart's [documentation](https://flutter.dev/docs/development/platform-integration/platform-channels#architecture), calling into platform specific code is asynchronous to ensure the user interface remains responsive. In your code, you can swap usage between `async` and `then` in accordance to your app's requirements. For a full description of all classes, methods, and properties, see the [mParticle Flutter SDK API Reference](https://pub.dev/documentation/mparticle_flutter_sdk/latest/). diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..86a6e8d --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,14 @@ +# Releasing + +Run **Release – Draft** on `main` and choose a patch, minor, or major bump. +The shared Rokt action generates changelog entries from merged PR titles since +the previous release tag, including all commit types. Conventional prefixes +determine categories; use `!` for breaking changes. Keep Unreleased empty. + +Review the generated notes in the release PR, adding migration guidance where +needed. Merging creates the `v`-prefixed tag and starts tests, builds and +publication. The GitHub release includes the matching Full Changelog URL. + +Package versions and changelog headings use bare versions (`2.3.0`); tags use +`v` (`v2.3.0`). Generation uses full history and explicitly sets `tag-prefix: v`. +Historical links retain existing tags; the untagged `1.0.5` heading stays unlinked.