Skip to content
FlightStack Docs
Sign in Start free

Auto Version Job | FlightStack

Computes a new version + build number for your Flutter app and writes it to pubspec.yaml before subsequent build jobs run. Eliminates the “forgot to bump the version” failure mode.

Step ref: flightstack/auto-version@1.0.0.

OptionDescriptionDefault
Bump strategypatch, minor, major, auto (from conventional commits)auto
Build numberincrement, git-commits, timestamp, or a fixed valueincrement
Source branchBranch to count commits againstrepo default
Pubspec pathPath to the pubspec.yaml to mutatepubspec.yaml
Commit changesCommit and push the bumped pubspec back to the source branchfalse
Tag commitCreate vX.Y.Z tag on the version commitfalse
Generate CHANGELOGAppend a section to CHANGELOG.md from git log between previous tag and HEADfalse
StrategyBehavior
patch1.2.31.2.4
minor1.2.31.3.0
major1.2.32.0.0
autoParses conventional commits since the last tag. BREAKING CHANGE → major; feat: → minor; fix: and others → patch.
StrategySource
incrementLast persisted build number + 1
git-commitsTotal commit count on the source branch
timestampYYYYMMDDhhmm from the run start time
Fixed valueA literal integer (useful for one-off backfills)
NameDescription
versionNew semver string (e.g. 1.4.0)
buildNumberNew build number
tagGit tag created (when Tag commit is on)

Reference downstream — for example, the Notifications job often interpolates ${{ steps.version.outputs.version }} into Slack messages.

┌──────────┐ ┌──────────────┐ ┌───────────┐ ┌────────────┐
│ On Push │───▶│ Auto Version │───▶│ Build iOS │───▶│ Deploy iOS │
│ main │ │ │ │ │ │ │
└──────────┘ └──────────────┘ └───────────┘ └────────────┘

“Failed to push version commit” The agent needs push permission. The default GitHub App write scope handles this — check the Commit changes option is on the App’s permissions.

Conventional commit detection mis-bumps Run the job with a fixed strategy (patch/minor) and switch back to auto after fixing your team’s commit-message conventions.