From 2a06b8b2bb55731bfcecd147f04633ec09567da7 Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Tue, 7 Apr 2026 13:59:56 -0400 Subject: [PATCH 1/9] ci: Switch from Gusto self-hosted runners to GitHub-hosted runners Public repos can use GitHub-hosted runners directly. The self-hosted runner dependency was preventing releases (macOS runner unavailable) and adding unnecessary coupling to internal infrastructure. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/gh-page.yml | 6 ++---- .github/workflows/release.yml | 17 +++++++---------- .github/workflows/test.yml | 3 +-- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/gh-page.yml b/.github/workflows/gh-page.yml index edb4262..7154dd7 100644 --- a/.github/workflows/gh-page.yml +++ b/.github/workflows/gh-page.yml @@ -8,8 +8,7 @@ on: jobs: build: - runs-on: - group: gusto-ubuntu-default + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -41,8 +40,7 @@ jobs: if: ${{ github.ref_type == 'tag' || github.ref == 'refs/heads/main' }} # Specify runner + deployment step - runs-on: - group: gusto-ubuntu-default + runs-on: ubuntu-latest steps: - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bcd881e..40ff488 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,7 @@ on: jobs: prepare-release: name: Prepare Release - runs-on: - group: gusto-ubuntu-default + runs-on: ubuntu-latest outputs: version: ${{ steps.version.outputs.version }} steps: @@ -64,23 +63,22 @@ jobs: build: name: Build ${{ matrix.target }} needs: prepare-release - runs-on: - group: ${{ matrix.runner }} + runs-on: ${{ matrix.runner }} strategy: fail-fast: false matrix: include: - target: aarch64-apple-darwin - runner: gusto-osx-default + runner: macos-latest use-cross: false - target: x86_64-unknown-linux-gnu - runner: gusto-ubuntu-default + runner: ubuntu-latest use-cross: true - target: x86_64-unknown-linux-musl - runner: gusto-ubuntu-default + runner: ubuntu-latest use-cross: true - target: aarch64-unknown-linux-gnu - runner: gusto-ubuntu-default + runner: ubuntu-latest use-cross: true steps: - name: Checkout release branch @@ -124,8 +122,7 @@ jobs: release: name: Create GitHub Release needs: [prepare-release, build] - runs-on: - group: gusto-ubuntu-default + runs-on: ubuntu-latest steps: - name: Download all artifacts uses: actions/download-artifact@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c016d0d..c3962aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,8 +14,7 @@ on: jobs: tests: name: Run Tests - runs-on: - group: gusto-ubuntu-default + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: rustup update From 3321802da704a89241e7c55f8d4f38031ea08925 Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Tue, 7 Apr 2026 14:02:41 -0400 Subject: [PATCH 2/9] ci: Fix release workflow to use origin/main ref When dispatched on a non-main branch, the local 'main' ref doesn't exist. Use 'origin/main' which is always available after fetch. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40ff488..66ffb95 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: fi # Merge main into release (no commit yet) - git merge main --no-commit --no-ff + git merge origin/main --no-commit --no-ff # Update version in Cargo.toml sed -i 's/^version = "0.0.0-dev"/version = "'"${VERSION}"'"/' Cargo.toml From e9454a707bd80bdf0a27640cec64263adc59980f Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Tue, 7 Apr 2026 14:04:47 -0400 Subject: [PATCH 3/9] ci: Fix release version stamping and merge handling - Replace any existing version in Cargo.toml, not just 0.0.0-dev (release branch retains the previous release version) - Handle no-op merge when release is already up to date with main - Use git add -A to capture all merge + version changes Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66ffb95..e4ea84b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,14 +43,14 @@ jobs: fi # Merge main into release (no commit yet) - git merge origin/main --no-commit --no-ff + git merge origin/main --no-commit --no-ff || true - # Update version in Cargo.toml - sed -i 's/^version = "0.0.0-dev"/version = "'"${VERSION}"'"/' Cargo.toml + # Update version in Cargo.toml (replace any existing version) + sed -i 's/^version = ".*"/version = "'"${VERSION}"'"/' Cargo.toml grep -q "^version = \"${VERSION}\"" Cargo.toml || { echo "Version update failed"; exit 1; } - # Commit merge with version bump - git add Cargo.toml + # Commit release with version bump + git add -A git commit -m "Release v${VERSION}" # Create tag From aa8759617e7db55fe30b26b4defcf0cbf1cff19e Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Tue, 7 Apr 2026 14:09:10 -0400 Subject: [PATCH 4/9] ci: Split release into separate push job on gusto-ubuntu runner Only the git push step needs the self-hosted runner (due to org IP allow list). All other jobs use GitHub-hosted runners. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e4ea84b..bc7795f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,11 +18,6 @@ jobs: with: fetch-depth: 0 - - name: Setup git user - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - - name: Calculate version id: version run: | @@ -30,10 +25,28 @@ jobs: echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "Version: ${VERSION}" + push-release: + name: Push Release Branch and Tag + needs: prepare-release + runs-on: + group: gusto-ubuntu-default + outputs: + version: ${{ needs.prepare-release.outputs.version }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup git user + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + - name: Merge to release branch and tag run: | set -euo pipefail - VERSION="${{ steps.version.outputs.version }}" + VERSION="${{ needs.prepare-release.outputs.version }}" # Checkout or create release branch if git fetch origin release:release 2>/dev/null; then @@ -62,7 +75,7 @@ jobs: build: name: Build ${{ matrix.target }} - needs: prepare-release + needs: push-release runs-on: ${{ matrix.runner }} strategy: fail-fast: false @@ -121,7 +134,7 @@ jobs: release: name: Create GitHub Release - needs: [prepare-release, build] + needs: [push-release, build] runs-on: ubuntu-latest steps: - name: Download all artifacts @@ -136,7 +149,7 @@ jobs: GH_REPO: ${{ github.repository }} run: | set -euo pipefail - VERSION="${{ needs.prepare-release.outputs.version }}" + VERSION="${{ needs.push-release.outputs.version }}" gh release create "v${VERSION}" \ --title "v${VERSION}" \ --notes "" \ From 6861eaaae2e3528ed57a47490c9839811903b66a Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Tue, 7 Apr 2026 14:13:20 -0400 Subject: [PATCH 5/9] ci: Fix version format to produce valid semver Cargo rejects leading zeros in version components (e.g. 2026.04.07). Use non-padded month/day to produce valid versions like 2026.4.7.1809. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc7795f..19dceac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,12 @@ jobs: - name: Calculate version id: version run: | - VERSION=$(date -u +%Y.%m.%d.%H%M) + # Use non-padded month/day to produce valid semver (no leading zeros) + YEAR=$(date -u +%Y) + MONTH=$(date -u +%-m) + DAY=$(date -u +%-d) + TIME=$(date -u +%H%M) + VERSION="${YEAR}.${MONTH}.${DAY}.${TIME}" echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "Version: ${VERSION}" From 9bfe7c83690a0fdc69acd0cb786e55bdc6a5a35e Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Tue, 7 Apr 2026 14:15:39 -0400 Subject: [PATCH 6/9] ci: Use 3-component semver version format Cargo requires strict semver (MAJOR.MINOR.PATCH) with no leading zeros. Use YEAR.MONTHDAY.HOURMIN format (e.g. 2026.407.1813). Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19dceac..baafdb0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,12 +21,11 @@ jobs: - name: Calculate version id: version run: | - # Use non-padded month/day to produce valid semver (no leading zeros) + # Semver requires exactly 3 numeric components with no leading zeros YEAR=$(date -u +%Y) - MONTH=$(date -u +%-m) - DAY=$(date -u +%-d) - TIME=$(date -u +%H%M) - VERSION="${YEAR}.${MONTH}.${DAY}.${TIME}" + MONTH_DAY=$(date -u +%-m%d) + TIME=$(date -u +%-H%M) + VERSION="${YEAR}.${MONTH_DAY}.${TIME}" echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "Version: ${VERSION}" From 1a14d6188c10451a2b03d759ab53d21c8d59b9a2 Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Tue, 7 Apr 2026 14:25:22 -0400 Subject: [PATCH 7/9] ci: Use gusto-ubuntu runner for release creation step Creating a GitHub release requires write API access, which is blocked by the org IP allow list on GitHub-hosted runners. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index baafdb0..582951a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -139,7 +139,8 @@ jobs: release: name: Create GitHub Release needs: [push-release, build] - runs-on: ubuntu-latest + runs-on: + group: gusto-ubuntu-default steps: - name: Download all artifacts uses: actions/download-artifact@v4 From f354727d5e730fa66beacca57131f5fd9653b997 Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Tue, 7 Apr 2026 17:10:06 -0400 Subject: [PATCH 8/9] ci: Use readable CalVer format YEAR.MONTH.DAY+HHMM Since this isn't published to crates.io, we can use build metadata for the time component. Produces versions like 2026.4.7+1823. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 582951a..fb415d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,11 +21,8 @@ jobs: - name: Calculate version id: version run: | - # Semver requires exactly 3 numeric components with no leading zeros - YEAR=$(date -u +%Y) - MONTH_DAY=$(date -u +%-m%d) - TIME=$(date -u +%-H%M) - VERSION="${YEAR}.${MONTH_DAY}.${TIME}" + # CalVer: YEAR.MONTH.DAY+HHMM (build metadata for uniqueness) + VERSION="$(date -u +%-Y.%-m.%-d+%H%M)" echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "Version: ${VERSION}" From 986ed6f698c2437c8f8219d3860a3683c38458c8 Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Tue, 7 Apr 2026 17:15:47 -0400 Subject: [PATCH 9/9] ci: Document CalVer build metadata tradeoff Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb415d0..748d25a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,12 @@ jobs: - name: Calculate version id: version run: | - # CalVer: YEAR.MONTH.DAY+HHMM (build metadata for uniqueness) + # CalVer: YEAR.MONTH.DAY+HHMM — e.g., 2026.4.7+1823 + # The +HHMM build metadata ensures uniqueness for multiple same-day + # releases. Per semver, build metadata is ignored for version + # comparison (2026.4.7+0900 == 2026.4.7+1400), but that's fine + # since this package isn't published to crates.io — the version + # only appears in the compiled binary and git tags. VERSION="$(date -u +%-Y.%-m.%-d+%H%M)" echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "Version: ${VERSION}"