Skip to content
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
48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish to pub.dev

# Two ways to trigger:
#
# 1. Automatic — push a tag:
# git tag v5.0.10
# git push origin v5.0.10
#
# 2. Manual via GitHub web UI — go to Actions → Publish to pub.dev → Run workflow
# IMPORTANT: select the tag (e.g. v5.0.10) from the "Use workflow from" dropdown,
# NOT a branch. pub.dev requires ref_type=tag for OIDC even on workflow_dispatch.
# Also requires "Allow workflow_dispatch" to be enabled on pub.dev package admin page.

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # tag pattern on pub.dev: v{{version}}
workflow_dispatch:

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
channel: stable

- name: Install dependencies
run: flutter pub get

- name: Verify formatting
run: dart format --output=none --set-exit-if-changed lib/

- name: Analyze
run: flutter analyze --no-fatal-infos

- name: Run tests
run: flutter test

publish:
name: Publish
needs: test
permissions:
id-token: write # Required for OIDC authentication with pub.dev
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
38 changes: 38 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Tag and Release

# Run this first. It creates the git tag which then automatically
# triggers the "Publish to pub.dev" workflow.

on:
workflow_dispatch:
inputs:
version:
description: 'Version to release (must match pubspec.yaml, e.g. 5.0.10)'
required: true

jobs:
tag:
name: Create tag
runs-on: ubuntu-latest
permissions:
contents: write # Required to push a tag

steps:
- uses: actions/checkout@v4

- name: Validate version sync (pubspec.yaml vs input)
run: |
PUBSPEC_VERSION=$(grep '^version:' pubspec.yaml | awk '{print $2}')
INPUT_VERSION="${{ github.event.inputs.version }}"
if [ "$PUBSPEC_VERSION" != "$INPUT_VERSION" ]; then
echo "❌ Version mismatch: pubspec.yaml has $PUBSPEC_VERSION but input is $INPUT_VERSION"
exit 1
fi
echo "✅ Version $PUBSPEC_VERSION confirmed"

- name: Create and push tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag "v${{ github.event.inputs.version }}"
git push origin "v${{ github.event.inputs.version }}"
64 changes: 64 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Validate

# Runs on every push to main and on pull requests.
# Verifies that the package is ready to publish without actually publishing.

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
channel: stable

- name: Install dependencies
run: flutter pub get

- name: Verify formatting
run: dart format --output=none --set-exit-if-changed lib/

- name: Analyze
run: flutter analyze --no-fatal-infos

- name: Run tests
run: flutter test

publish-dry-run:
name: Publish dry run
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dart-lang/setup-dart@v1

- uses: subosito/flutter-action@v2
with:
channel: stable

- name: Install dependencies
run: flutter pub get

- name: Validate version sync (pubspec.yaml vs source code)
run: |
PUBSPEC_VERSION=$(grep '^version:' pubspec.yaml | awk '{print $2}')
SOURCE_VERSION=$(grep 'flutterPluginVersion' lib/plugin_mappintelligence.dart | grep -oP '"\K[^"]+')
if [ "$PUBSPEC_VERSION" != "$SOURCE_VERSION" ]; then
echo "❌ Version mismatch: pubspec.yaml=$PUBSPEC_VERSION, plugin_mappintelligence.dart=$SOURCE_VERSION"
exit 1
fi
echo "✅ Version $PUBSPEC_VERSION in sync"

- name: Publish dry run
run: dart pub publish --dry-run
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## 5.0.10
- WebTrackingController: added optional `navigationDelegate` parameter allowing clients to provide their own NavigationDelegate; all callbacks (onPageStarted, onPageFinished, onProgress, onWebResourceError, onNavigationRequest) are preserved alongside the plugin's tracking logic
- WebTrackingController: client-provided onPageFinished now fires after EverID injection completes; onLoad is invoked only on successful page load; added null guard for malformed WebView messages
- Updated Kotlin to 2.3.0 (plugin and example)
- Updated Android Gradle Plugin to 8.13.2 and Gradle wrapper to 8.13
- Bumped compileSdkVersion and targetSdkVersion to 36
Expand Down
Loading