From d7c671c4e4e38044d40049d223c4992c328a7778 Mon Sep 17 00:00:00 2001 From: Amitai Schleier Date: Sat, 28 Nov 2026 07:56:23 -0500 Subject: [PATCH 1/2] release: declare self-upstream-date, and derive and check the version with shipyard Shipyard v1.0.972 requires a declared versioning scheme, committed release notes, and publish-release.yml's product input. INGREDIENTS.md declares self-upstream-date (YYYYMMDD.N). A version-check job derives the tag with release-version.sh, makes the publish decision (still a dispatch only, when release-needed.sh says so), and checks both with check-release-version.sh before any macOS job starts. The hand-rolled .N loops in release.yml and builds.yml are gone. The first tag under the scheme is 20261127.1, with its notes committed. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01X9pCeDuqouAc6ZvneKhE4p --- .github/workflows/builds.yml | 10 +-- .github/workflows/release.yml | 75 +++++++++++++------ INGREDIENTS.md | 4 + .../changes/unified-toolchains-and-versioning | 1 + 4 files changed, 60 insertions(+), 30 deletions(-) create mode 100644 release-notes/20261127.1/changes/unified-toolchains-and-versioning diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 80530e7..ee0d638 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -92,15 +92,9 @@ jobs: push|workflow_dispatch) if [ "$GITHUB_REF" = refs/heads/main ]; then pub="$wanted"; fi ;; esac printf '%s\n' "$id" > BUILD_ID - # The test pkg's own version, YYYYMMDD.N, as release.yml computes it; CMake reads VERSION + # The test pkg's own version, YYYYMMDD.N, as release.yml derives it; CMake reads VERSION # for the updater, so it is written before configuring. - base="$(tr -d '[:space:]' < UPSTREAM_VERSION)" - maxn=0 - for t in $(git tag --list "$base.*"); do - n="${t##*.}" - case "$n" in ''|*[!0-9]*) : ;; *) [ "$n" -gt "$maxn" ] && maxn="$n" ;; esac - done - pkgver="$base.$((maxn + 1))" + pkgver="$(sh "$SHIPYARD_SCRIPTS/release-version.sh" --product codex-cli --mode auto)" printf '%s\n' "$pkgver" > VERSION { echo "id=$id"; echo "next=$next"; echo "codex=$codex"; echo "state=$state" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67e58f3..1f85af7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,54 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: + # spec: INGREDIENTS.md "Versioning" -- self-upstream-date: shipyard's release-version.sh derives + # YYYYMMDD.N, and check-release-version.sh checks it and its committed notes. Only a dispatch + # publishes, and only when release-needed.sh says the declared state is unreleased. + version-check: + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + outputs: + tag: ${{ steps.tag.outputs.tag }} + publish: ${{ steps.tag.outputs.publish }} + mode: ${{ steps.tag.outputs.mode }} + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Install mavericks-shipyard + uses: Mavergreen/shipyard/.github/actions/install@v1 + + - name: Derive and check the version, and decide whether to publish + id: tag + env: + LOCAL_RELEASE: ${{ inputs.local_release }} + GH_TOKEN: ${{ github.token }} + run: | + set -eu + mode="$(sh "$SHIPYARD_SCRIPTS/release-mode.sh")" + t="$(sh "$SHIPYARD_SCRIPTS/release-version.sh" --product codex-cli --mode "$mode")" + pub=no + if [ "$GITHUB_EVENT_NAME" = workflow_dispatch ]; then + if [ "$LOCAL_RELEASE" = true ]; then + pub=yes + else + digest="$(sh "$SHIPYARD_SCRIPTS/release-state.sh")" + answer="$(sh "$SHIPYARD_SCRIPTS/release-needed.sh" --digest "$digest" --version "$t")" + echo "release-needed: $answer" + if [ "$answer" = PUBLISH ]; then pub=yes; fi + fi + fi + sh "$SHIPYARD_SCRIPTS/check-release-version.sh" --product codex-cli --version "$t" --sha "$GITHUB_SHA" \ + --mode "$mode" --publishing "$pub" + { echo "tag=$t"; echo "publish=$pub"; echo "mode=$mode"; } >> "$GITHUB_OUTPUT" + echo "version=$t publish=$pub mode=$mode" + build: + needs: version-check runs-on: macos-26 timeout-minutes: 45 outputs: @@ -52,31 +99,13 @@ jobs: run: sh "$SHIPYARD_SCRIPTS/assert-tree-clean.sh" --record # CMake reads VERSION for the updater, so it is written before configuring. - - name: Version (YYYYMMDD.N) + publish decision + - name: Version (YYYYMMDD.N) + publish decision, from version-check id: ver env: - LOCAL_RELEASE: ${{ inputs.local_release }} - GH_TOKEN: ${{ github.token }} + ver: ${{ needs.version-check.outputs.tag }} + pub: ${{ needs.version-check.outputs.publish }} run: | set -eu - base="$(tr -d '[:space:]' < UPSTREAM_VERSION)" - maxn=0 - for t in $(git tag --list "$base.*"); do - n="${t##*.}" - case "$n" in ''|*[!0-9]*) : ;; *) [ "$n" -gt "$maxn" ] && maxn="$n" ;; esac - done - ver="$base.$((maxn + 1))" - pub=no - if [ "$GITHUB_EVENT_NAME" = workflow_dispatch ]; then - if [ "$LOCAL_RELEASE" = true ]; then - pub=yes - else - digest="$(sh "$SHIPYARD_SCRIPTS/release-state.sh")" - answer="$(sh "$SHIPYARD_SCRIPTS/release-needed.sh" --digest "$digest" --version "$ver")" - echo "release-needed: $answer" - if [ "$answer" = PUBLISH ]; then pub=yes; fi - fi - fi printf '%s\n' "$ver" > VERSION { echo "ver=$ver"; echo "publish=$pub"; } >> "$GITHUB_OUTPUT" echo "version=$ver publish=$pub" @@ -271,7 +300,7 @@ jobs: # publish-release.yml creates the release with GitHub's default, so the pkg becomes the repo's # Latest; the codex-builds release is created with --latest=false and never takes it. publish: - needs: [build, scan, on-mavericks] + needs: [version-check, build, scan, on-mavericks] if: needs.build.outputs.publish == 'yes' permissions: contents: write @@ -279,3 +308,5 @@ jobs: with: version: ${{ needs.build.outputs.ver }} artifact: codex-cli + product: codex-cli + release-mode: ${{ needs.version-check.outputs.mode }} diff --git a/INGREDIENTS.md b/INGREDIENTS.md index 7d5a530..4686f70 100644 --- a/INGREDIENTS.md +++ b/INGREDIENTS.md @@ -293,6 +293,10 @@ a Codex bump updates it here along with the DIGEST in `components/codex/version` - **Biometric user verification reports unsupported** (0004), because it needs LocalAuthentication and Secure Enclave APIs, which 10.9 lacks. It cannot be turned on. +## Versioning + +- self-upstream-date + ## Conformance deviations - scheme: the package is its own upstream (Codex reaches users through the builds channel, pinned in components/codex/version), so it versions itself by date as YYYYMMDD.N with no -mavericks.N axis diff --git a/release-notes/20261127.1/changes/unified-toolchains-and-versioning b/release-notes/20261127.1/changes/unified-toolchains-and-versioning new file mode 100644 index 0000000..8731d4c --- /dev/null +++ b/release-notes/20261127.1/changes/unified-toolchains-and-versioning @@ -0,0 +1 @@ +The package is built with shipyard's unified toolchains, and releases now take their version and notes from shipyard's checks. The launcher, installer and updater behave as before. From 8eaf6539a53e7e011c2c2da16d7d5a4b9ab26b61 Mon Sep 17 00:00:00 2001 From: Amitai Schleier Date: Sat, 28 Nov 2026 09:24:26 -0500 Subject: [PATCH 2/2] release: notes in users' words, and no scheme deviation now that Versioning declares it Shipyard v1.0.974 checks a release note's wording at version-check and reads the scheme from INGREDIENTS.md's Versioning section. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01X9pCeDuqouAc6ZvneKhE4p --- INGREDIENTS.md | 1 - .../20261127.1/changes/unified-toolchains-and-versioning | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/INGREDIENTS.md b/INGREDIENTS.md index 4686f70..c6b5e64 100644 --- a/INGREDIENTS.md +++ b/INGREDIENTS.md @@ -299,7 +299,6 @@ a Codex bump updates it here along with the DIGEST in `components/codex/version` ## Conformance deviations -- scheme: the package is its own upstream (Codex reaches users through the builds channel, pinned in components/codex/version), so it versions itself by date as YYYYMMDD.N with no -mavericks.N axis - builds-channel: Codex builds are signed and published to this repo's codex-builds release by build/channel-publish.sh from .github/workflows/builds.yml, not by shipyard, until shipyard has machinery for a builds channel - unpinned:build/channel-publish.sh: before it publishes a build whose metadata names a min-pkg, it reads this repo's own Latest release, because the check is that the pkg the build needs is already offered to users, which only the newest release can say; a pin would be the very staleness it guards against. Reconsider if shipyard's builds-channel machinery takes over that check diff --git a/release-notes/20261127.1/changes/unified-toolchains-and-versioning b/release-notes/20261127.1/changes/unified-toolchains-and-versioning index 8731d4c..33b609b 100644 --- a/release-notes/20261127.1/changes/unified-toolchains-and-versioning +++ b/release-notes/20261127.1/changes/unified-toolchains-and-versioning @@ -1 +1 @@ -The package is built with shipyard's unified toolchains, and releases now take their version and notes from shipyard's checks. The launcher, installer and updater behave as before. +The package is now built with the same compilers on every host, and each release carries its own notes. The launcher, installer and updater work as before.