Auto Version Job | FlightStack
Auto Version Job
Section titled “Auto Version Job”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.
Configuration
Section titled “Configuration”| Option | Description | Default |
|---|---|---|
| Bump strategy | patch, minor, major, auto (from conventional commits) | auto |
| Build number | increment, git-commits, timestamp, or a fixed value | increment |
| Source branch | Branch to count commits against | repo default |
| Pubspec path | Path to the pubspec.yaml to mutate | pubspec.yaml |
| Commit changes | Commit and push the bumped pubspec back to the source branch | false |
| Tag commit | Create vX.Y.Z tag on the version commit | false |
| Generate CHANGELOG | Append a section to CHANGELOG.md from git log between previous tag and HEAD | false |
Bump strategies
Section titled “Bump strategies”| Strategy | Behavior |
|---|---|
patch | 1.2.3 → 1.2.4 |
minor | 1.2.3 → 1.3.0 |
major | 1.2.3 → 2.0.0 |
auto | Parses conventional commits since the last tag. BREAKING CHANGE → major; feat: → minor; fix: and others → patch. |
Build number strategies
Section titled “Build number strategies”| Strategy | Source |
|---|---|
increment | Last persisted build number + 1 |
git-commits | Total commit count on the source branch |
timestamp | YYYYMMDDhhmm from the run start time |
| Fixed value | A literal integer (useful for one-off backfills) |
Outputs
Section titled “Outputs”| Name | Description |
|---|---|
version | New semver string (e.g. 1.4.0) |
buildNumber | New build number |
tag | Git tag created (when Tag commit is on) |
Reference downstream — for example, the
Notifications job often interpolates
${{ steps.version.outputs.version }} into Slack messages.
Example pipeline
Section titled “Example pipeline”┌──────────┐ ┌──────────────┐ ┌───────────┐ ┌────────────┐│ On Push │───▶│ Auto Version │───▶│ Build iOS │───▶│ Deploy iOS ││ main │ │ │ │ │ │ │└──────────┘ └──────────────┘ └───────────┘ └────────────┘Troubleshooting
Section titled “Troubleshooting”“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.
See also
Section titled “See also”- Build iOS and Build Android — the typical downstream jobs
- Variables — referencing
versionandbuildNumberin later steps