From 494bd8088721801c15e88d2891efb06f9e98dfde Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Thu, 22 Oct 2026 14:00:02 +0000 Subject: [PATCH 1/3] fix(autobump): register new Ruby series in series.yml Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/autobump.yml | 8 ++++---- libexec/update_ruby_recipe.rb | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/autobump.yml b/.github/workflows/autobump.yml index 6090e75..9bf8626 100644 --- a/.github/workflows/autobump.yml +++ b/.github/workflows/autobump.yml @@ -74,8 +74,8 @@ jobs: bin/update-ruby-recipe "$latest" "$tarball_url" "$sha256" bin/validate-recipes - if ! git diff --quiet -- recipes/rubies.yml; then - git add recipes/rubies.yml + if ! git diff --quiet -- recipes/rubies.yml recipes/series.yml; then + git add recipes/rubies.yml recipes/series.yml git commit -m "Add Ruby ${latest}" fi done @@ -121,8 +121,8 @@ jobs: bin/update-ruby-recipe "$version" "$tarball_url" "$sha256" bin/validate-recipes - if ! git diff --quiet -- recipes/rubies.yml; then - git add recipes/rubies.yml + if ! git diff --quiet -- recipes/rubies.yml recipes/series.yml; then + git add recipes/rubies.yml recipes/series.yml git commit -m "Add Ruby ${version}" fi done diff --git a/libexec/update_ruby_recipe.rb b/libexec/update_ruby_recipe.rb index 93f8337..af9ab8d 100755 --- a/libexec/update_ruby_recipe.rb +++ b/libexec/update_ruby_recipe.rb @@ -8,6 +8,7 @@ class UpdateRubyRecipeError < StandardError; end class UpdateRubyRecipe ROOT = File.expand_path("..", __dir__) RECIPE_PATH = File.join(ROOT, "recipes", "rubies.yml") + SERIES_PATH = File.join(ROOT, "recipes", "series.yml") PRE_RELEASE_RANK = { "preview" => 0, "rc" => 1 @@ -41,11 +42,22 @@ def run! rubies[@version] = entry File.write(RECIPE_PATH, updated_recipe_text(File.read(RECIPE_PATH), rubies)) + register_series(entry.fetch("series")) puts "#{old ? "Updated" : "Added"} Ruby #{@version} in recipes/rubies.yml" end private + # A new minor series has no overrides yet, so it gets the defaults. + def register_series(name) + text = File.read(SERIES_PATH) + doc = YAML.safe_load(text, permitted_classes: [], aliases: false) + return if doc.fetch("series").key?(name) + + File.write(SERIES_PATH, "#{text.chomp}\n \"#{name}\": {}\n") + puts "Added series #{name} in recipes/series.yml" + end + def recipe_entry entry = { "series" => @version[/\A\d+\.\d+/], From 5d7dedcdf6213e3498476a7ec05fe1682679a68d Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Thu, 22 Oct 2026 14:00:33 +0000 Subject: [PATCH 2/3] ci(autobump): email via Resend when autobump fails Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/autobump.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/autobump.yml b/.github/workflows/autobump.yml index 9bf8626..ddae227 100644 --- a/.github/workflows/autobump.yml +++ b/.github/workflows/autobump.yml @@ -134,3 +134,36 @@ jobs: else echo "No recipe changes to push" fi + + notify-failure: + needs: autobump + if: ${{ failure() }} + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Send failure email via Resend + env: + RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} + NOTIFY_EMAIL: ${{ secrets.NOTIFY_EMAIL }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + run: | + set -euo pipefail + if [ -z "${RESEND_API_KEY:-}" ] || [ -z "${NOTIFY_EMAIL:-}" ]; then + echo "::warning::RESEND_API_KEY or NOTIFY_EMAIL is unset; skipping autobump failure notification" + exit 0 + fi + payload=$(jq -n \ + --arg to "$NOTIFY_EMAIL" \ + --arg run_url "$RUN_URL" \ + '{ + from: "Ruby Releases ", + to: [$to], + subject: "❌ Ruby autobump failed", + html: ("

The autobump workflow failed, so new Ruby releases are not being picked up.

View workflow run

") + }') + curl --fail-with-body -sS \ + --retry 3 --retry-all-errors --retry-delay 2 --retry-max-time 60 \ + -X POST 'https://api.resend.com/emails' \ + -H "Authorization: Bearer ${RESEND_API_KEY}" \ + -H 'Content-Type: application/json' \ + -d "$payload" From 4b7b8f8b92f4a7c27f70fea39c333f22cfe76242 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Thu, 22 Oct 2026 14:06:33 +0000 Subject: [PATCH 3/3] fix(autobump): register the series when the recipe already exists Co-Authored-By: Claude Sonnet 5.5 --- libexec/update_ruby_recipe.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/update_ruby_recipe.rb b/libexec/update_ruby_recipe.rb index af9ab8d..45569f3 100755 --- a/libexec/update_ruby_recipe.rb +++ b/libexec/update_ruby_recipe.rb @@ -35,6 +35,7 @@ def run! rubies = doc.fetch("rubies") old = rubies[@version] entry = recipe_entry + register_series(entry.fetch("series")) if old == entry puts "Ruby #{@version} already exists in recipes/rubies.yml" return @@ -42,7 +43,6 @@ def run! rubies[@version] = entry File.write(RECIPE_PATH, updated_recipe_text(File.read(RECIPE_PATH), rubies)) - register_series(entry.fetch("series")) puts "#{old ? "Updated" : "Added"} Ruby #{@version} in recipes/rubies.yml" end