Auto Version

flightstack/auto-version@1.0.0 Step Verified

Compute the next version + build number for the run.

Add it to a pipeline

jobs:
  - id: auto-version
    uses: flightstack/auto-version@1.0.0

Or drag it onto the canvas from the step palette in the visual editor. Pin an exact version for production pipelines.

Inputs

strategy string default stores
How to determine the next build number. - stores: The next build number free on both Google Play and App Store Connect, so one number works for the Android and iOS builds of the same run. Skips App Store Connect when the repository has no App Store Connect API key. - googlePlay: Query the highest version code across every Google Play track (including custom closed-testing tracks) and pick the next free value. - testflight: Query App Store Connect (TestFlight) for the highest build number. - increment: Add incrementBy to baseBuildNumber. - custom: Use customBuildNumber verbatim. - timestamp: Use the current UTC time encoded as YYMMDDHHmm. - release: Use the version and build number chosen when the release run was started (inputs.release.<platform>). Requires platform, and the pipeline's Manual trigger must have release inputs configured.
platform string
Platform whose release inputs to emit when strategy is release.
packageName string
Android package name. Overrides the credential's stored package. Required for googlePlay if not set on the credential.
bundleId string
iOS bundle identifier. Overrides the credential's stored bundle. Required for testflight if not set on the credential.
versionName string
Semver string to write to pubspec.yaml. Defaults to 1.0.<buildNumber> if blank.
baseBuildNumber integer default 1
Starting build number for the increment strategy.
incrementBy integer default 1
Amount to add to baseBuildNumber when using the increment strategy.
customBuildNumber integer
Exact build number to use when strategy is custom.
customVersionName string
Exact version name to use when strategy is custom. Falls back to versionName if blank.
workingDirectory string default .
Project sub-directory containing pubspec.yaml.

Outputs

versionstring
Semver string written back to pubspec.yaml.
buildNumberinteger
Resolved build number.