File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,11 +72,15 @@ jobs:
7272 outputs :
7373 version : ${{ steps.bump.outputs.version }}
7474 steps :
75- # bt-fake: generates a version from the run number — no version bump PR needed.
76- # Remove this job in real SDK workflows; version comes from the version bump PR.
75+ # bt-fake: derives next version by querying RubyGems.org and incrementing the
76+ # patch. Falls back to 0.0.1 on first publish (404). Remove this job in real
77+ # SDK workflows; version comes from the version bump PR.
7778 - name : Bump version
7879 id : bump
79- run : echo "version=0.0.${{ github.run_number }}" >> $GITHUB_OUTPUT
80+ run : |
81+ CURRENT=$(curl -sf https://rubygems.org/api/v1/gems/bt-fake.json | jq -r '.version' || echo "0.0.0")
82+ IFS='.' read -r major minor patch <<< "$CURRENT"
83+ echo "version=$major.$minor.$((patch + 1))" >> $GITHUB_OUTPUT
8084
8185 validate :
8286 needs : bump
You can’t perform that action at this time.
0 commit comments