Monotonic build number (Forgejo variable counter / run-number / timestamp) + version name, with optional Info.plist and build.gradle updates. No github.com.
  • JavaScript 75.9%
  • Shell 18.4%
  • Makefile 5.7%
Find a file
Stephen Way f41c84fa74
Some checks are pending
test / unit (push) Waiting to run
Repoint references from rasterstate to fjord org
Org migration: the action family now lives under fjord/. Repoints internal repo references (uses:, CI badges, docs, migration guides) at fjord/ and sets the action author to fjord. The old rasterstate copies are left in place.
2026-06-03 16:16:56 -07:00
.forgejo/workflows Initial release: fjord-version-bump-action 2026-06-01 19:34:26 -07:00
src Initial release: fjord-version-bump-action 2026-06-01 19:34:26 -07:00
tests Initial release: fjord-version-bump-action 2026-06-01 19:34:26 -07:00
.gitignore Initial release: fjord-version-bump-action 2026-06-01 19:34:26 -07:00
action.yml Repoint references from rasterstate to fjord org 2026-06-03 16:16:56 -07:00
CHANGELOG.md Initial release: fjord-version-bump-action 2026-06-01 19:34:26 -07:00
LICENSE Initial release: fjord-version-bump-action 2026-06-01 19:34:26 -07:00
Makefile Initial release: fjord-version-bump-action 2026-06-01 19:34:26 -07:00
README.md Repoint references from rasterstate to fjord org 2026-06-03 16:16:56 -07:00

Fjord Version Bump

A fresh build number, every build. App Store Connect and Google Play reject a reused build number; this produces a monotonic one (and a version name) and, optionally, writes them into your Android build.gradle / iOS Info.plist. No github.com.

Part of the Fjord Actions bundle. Pairs with apple-codesign + fjord-distribute.

Usage

jobs:
  build:
    runs-on: macos
    # Serialize release builds so the counter doesn't race.
    concurrency: { group: ios-build, cancel-in-progress: false }
    steps:
      - uses: actions/checkout@v6

      - id: ver
        uses: https://rasterhub.com/fjord/fjord-version-bump-action@v1
        with:
          strategy: counter        # shared, monotonic across workflows
          version-name: ${{ github.ref_name }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - run: |
          xcodebuild ... \
            CURRENT_PROJECT_VERSION=${{ steps.ver.outputs.build-number }} \
            MARKETING_VERSION=${{ steps.ver.outputs.version-name }}

Strategies

strategy Build number Notes
counter (default) a Forgejo variable, incremented Shared across workflows. Serialize concurrent release builds with concurrency; the variable API has no compare-and-set.
run-number GITHUB_RUN_NUMBER Monotonic per workflow, no state. Collides if multiple workflows build the same app.
timestamp UTC YYYYMMDDHHMM Monotonic, no state, no coordination.

Inputs

Input Default Description
strategy counter counter / run-number / timestamp.
variable-name BUILD_NUMBER Counter variable (counter strategy).
scope repo repo or org (where the counter lives).
org repo owner Org for scope: org.
version-name GITHUB_REF_NAME (no leading v) Marketing version.
gradle-path build.gradle(.kts) to update versionCode/versionName.
plist-path Info.plist to update CFBundleVersion/CFBundleShortVersionString.
token / api_url / repository derived Forgejo auth + target (counter strategy).

Outputs

Output Description
build-number The monotonic build number.
version-name The marketing version.

The gradle-path / plist-path writes are best-effort regex edits: they update existing keys, they don't create them. Most pipelines just pass the outputs to xcodebuild/Gradle as arguments instead.

License

MIT, see LICENSE.