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%
|
All checks were successful
test / unit (push) Successful in 7s
Produce a monotonic build number (Forgejo variable counter, GITHUB_RUN_NUMBER, or UTC timestamp) and a version name, and optionally write them into an Android build.gradle / iOS Info.plist. App Store Connect and Play reject reused build numbers; this gives a fresh one each build. No github.com. node20 action with pure file-transform cores. Offline suite covers the transforms plus the counter (increment + create-when-absent), run-number, and timestamp strategies against a mock variable API. |
||
|---|---|---|
| .forgejo/workflows | ||
| src | ||
| tests | ||
| .gitignore | ||
| action.yml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
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/rasterstate/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.