Skip to content

ci: migrate versioning from standard-version to mtrust-api-guard - #4

Merged
ElectricCookie merged 2 commits into
devfrom
ci/api-guard-migration
Aug 14, 2026
Merged

ci: migrate versioning from standard-version to mtrust-api-guard#4
ElectricCookie merged 2 commits into
devfrom
ci/api-guard-migration

Conversation

@ElectricCookie

Copy link
Copy Markdown
Collaborator

Summary

Replaces the Node.js-based standard-version versioning pipeline with mtrust-api-guard — an API-diff-driven semver tool built for Dart/Flutter packages.

Changes

Workflows

  • build_dev.yaml / build_main.yaml: Replace standard-version + update-pubspec action chain with mtrust_api_guard version. Switched from ELEVATED_TOKEN PAT to the bumper GitHub App token (BUMPER_APP_ID / BUMPER_APP_KEY) so tag pushes correctly trigger downstream pub.dev publish workflows. Runners downgraded from macos-latestubuntu-latest. [skip ci] guard added to prevent workflow loops on version bump commits.
  • pr_dev.yaml / pr_main.yaml: Added api_changes job — dry-runs api-guard (--no-commit --no-tag) and posts the predicted next version + changelog as a PR comment.

Config

  • analysis_options.yaml: Added api_guard.entry_points pointing at lib/mtrust_barcode_kit.dart.

Cleanup

  • package.json: Removed — standard-version, commitizen, and dart_version.js are no longer needed.
  • CHANGELOG.md: Fully regenerated from actual API diffs across all existing git tags using mtrust_api_guard changelog --regenerate.

Pre-release format

Pre-release versions retain the existing 2.1.0-0 style (via --pre-release-prefix ""), so the publish_dev.yaml tag trigger pattern (v[0-9]+.[0-9]+.[0-9]+-[0-9]+) requires no changes.

- Replace standard-version (Node.js) with mtrust_api_guard version command
- Use GitHub App (bumper bot) token instead of ELEVATED_TOKEN PAT for
  release commits/tags, enabling tag-push-triggered pub.dev workflows
- Downgrade runners from macos-latest to ubuntu-latest for version jobs
- Add [skip ci] guard to prevent workflow loops on version bump commits
- Add api_changes job to PR workflows (pr_dev, pr_main) for API diff
  visibility — posts next version + changelog to PR comments
- Add api_guard entry_points config to analysis_options.yaml
- Regenerate CHANGELOG.md from API diffs across all existing git tags
- Remove package.json / standard-version / commitizen tooling
Merge duplicate build_dev and build_main version jobs into a single
reusable workflow (build_workflow.yaml). Callers pass branch and
pre_release as inputs; the workflow handles the rest.

- build_dev.yaml: delegates with branch=dev, pre_release=true
- build_main.yaml: delegates with branch=main, pre_release=false
- rebase_dev job runs conditionally when branch == main
@github-actions

Copy link
Copy Markdown

Version Analysis

Next Version: 2.1.0-1

Changelog: 📄 View detailed changelog in job summary

Badge:
Version Badge

@ElectricCookie
ElectricCookie merged commit 930dff1 into dev Aug 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant