From 19128df024908c86694317994869413c0bd6c1f4 Mon Sep 17 00:00:00 2001 From: sydneycollins-cio <149523950+sydneycollins-cio@users.noreply.github.com> Date: Tue, 24 Nov 2026 11:27:50 -0500 Subject: [PATCH 1/7] ci: add Slack release notices Co-Authored-By: Claude Fable 5.2 --- .github/workflows/publish.yml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3bcaca3..5594a41 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,6 +14,10 @@ jobs: name: Build and publish runs-on: ubuntu-latest environment: rubygems + env: + # Secrets can't be read in step `if`, so the steps below test this copy. + # Empty until the org secret exists, which skips the Slack steps. + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_SERVER_SDK_RELEASES_WEBHOOK_URL }} steps: - uses: actions/checkout@v7 @@ -27,6 +31,7 @@ jobs: bundler-cache: true - name: Verify tag matches gem version + id: version run: | tag="${GITHUB_REF#refs/tags/v}" version=$(ruby -r ./lib/customerio/version -e "puts Customerio::VERSION") @@ -34,6 +39,50 @@ jobs: echo "::error::Tag v$tag does not match Customerio::VERSION ($version)" exit 1 fi + echo "version=$version" >> "$GITHUB_OUTPUT" - name: Publish to RubyGems + id: publish uses: rubygems/release-gem@v1 + + - name: Notify Slack of successful release + if: steps.publish.outcome == 'success' && env.SLACK_WEBHOOK_URL != '' + uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v2.0.0-rc.3 + with: + webhook: ${{ env.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook + payload: | + { + "text": "Ruby SDK ${{ steps.version.outputs.version }} published to RubyGems", + "channel": "#server-sdk-deployments", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Ruby* SDK ${{ steps.version.outputs.version }} published to RubyGems\n" + } + } + ] + } + + - name: Notify Slack of failed release + if: failure() && env.SLACK_WEBHOOK_URL != '' + uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v2.0.0-rc.3 + with: + webhook: ${{ env.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook + payload: | + { + "text": "Ruby SDK release failure", + "channel": "#server-sdk-deployments", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Ruby* SDK release :warning: failure :warning:\nView to learn why." + } + } + ] + } From ed2dadb5907fc30e2e9b3089c2233cce2b4a75fa Mon Sep 17 00:00:00 2001 From: sydneycollins-cio <149523950+sydneycollins-cio@users.noreply.github.com> Date: Tue, 24 Nov 2026 13:30:33 -0500 Subject: [PATCH 2/7] ci: post release notices to #mobile-deployments Co-Authored-By: Claude Fable 5.2 --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5594a41..05a4cf6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,7 @@ jobs: env: # Secrets can't be read in step `if`, so the steps below test this copy. # Empty until the org secret exists, which skips the Slack steps. - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_SERVER_SDK_RELEASES_WEBHOOK_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_RELEASES_WEBHOOK_URL }} steps: - uses: actions/checkout@v7 @@ -54,7 +54,7 @@ jobs: payload: | { "text": "Ruby SDK ${{ steps.version.outputs.version }} published to RubyGems", - "channel": "#server-sdk-deployments", + "channel": "#mobile-deployments", "blocks": [ { "type": "section", @@ -75,7 +75,7 @@ jobs: payload: | { "text": "Ruby SDK release failure", - "channel": "#server-sdk-deployments", + "channel": "#mobile-deployments", "blocks": [ { "type": "section", From 75fe67497091900521c5f46b061d38f0636c7ad2 Mon Sep 17 00:00:00 2001 From: sydneycollins-cio <149523950+sydneycollins-cio@users.noreply.github.com> Date: Tue, 24 Nov 2026 13:40:32 -0500 Subject: [PATCH 3/7] ci: post release notices to #server-sdk-deployments Co-Authored-By: Claude Fable 5.2 --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 05a4cf6..a8c7ef5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -54,7 +54,7 @@ jobs: payload: | { "text": "Ruby SDK ${{ steps.version.outputs.version }} published to RubyGems", - "channel": "#mobile-deployments", + "channel": "#server-sdk-deployments", "blocks": [ { "type": "section", @@ -75,7 +75,7 @@ jobs: payload: | { "text": "Ruby SDK release failure", - "channel": "#mobile-deployments", + "channel": "#server-sdk-deployments", "blocks": [ { "type": "section", From d87017b9c0c8f233ebe44b1f8f6efa36f3340a74 Mon Sep 17 00:00:00 2001 From: sydneycollins-cio <149523950+sydneycollins-cio@users.noreply.github.com> Date: Tue, 24 Nov 2026 13:49:52 -0500 Subject: [PATCH 4/7] ci: give release notices a bot name and logo Co-Authored-By: Claude Fable 5.2 --- .github/workflows/publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a8c7ef5..f074d0f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -54,6 +54,8 @@ jobs: payload: | { "text": "Ruby SDK ${{ steps.version.outputs.version }} published to RubyGems", + "username": "Ruby deployment bot", + "icon_url": "https://raw.githubusercontent.com/github/explore/main/topics/ruby/ruby.png", "channel": "#server-sdk-deployments", "blocks": [ { @@ -75,6 +77,8 @@ jobs: payload: | { "text": "Ruby SDK release failure", + "username": "Ruby deployment bot", + "icon_url": "https://raw.githubusercontent.com/github/explore/main/topics/ruby/ruby.png", "channel": "#server-sdk-deployments", "blocks": [ { From f1e0b07c8c78009e1ce207cb270b0d727860dcb1 Mon Sep 17 00:00:00 2001 From: sydneycollins-cio <149523950+sydneycollins-cio@users.noreply.github.com> Date: Tue, 24 Nov 2026 15:20:47 -0500 Subject: [PATCH 5/7] ci: keep Slack problems from failing a release Co-Authored-By: Claude Fable 5.2 --- .github/workflows/publish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f074d0f..a78c2c0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -47,7 +47,8 @@ jobs: - name: Notify Slack of successful release if: steps.publish.outcome == 'success' && env.SLACK_WEBHOOK_URL != '' - uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v2.0.0-rc.3 + uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0 + continue-on-error: true with: webhook: ${{ env.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook @@ -70,7 +71,8 @@ jobs: - name: Notify Slack of failed release if: failure() && env.SLACK_WEBHOOK_URL != '' - uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v2.0.0-rc.3 + uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0 + continue-on-error: true with: webhook: ${{ env.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook From ab1e725681e27cbbfba50b546adbbd3a8e679302 Mon Sep 17 00:00:00 2001 From: sydneycollins-cio <149523950+sydneycollins-cio@users.noreply.github.com> Date: Wed, 25 Nov 2026 11:20:02 -0500 Subject: [PATCH 6/7] ci: say in the failure notice whether the gem reached RubyGems Co-Authored-By: Claude Fable 5.2 --- .github/workflows/publish.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a78c2c0..d0209cb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -69,6 +69,23 @@ jobs: ] } + # The publish step also waits up to 5 minutes for RubyGems to serve the + # gem, so it can fail after the upload worked. One lookup tells the two apart. + - name: Check whether the gem reached RubyGems + id: uploaded + if: failure() && steps.publish.outcome == 'failure' + continue-on-error: true + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + url="https://rubygems.org/api/v2/rubygems/customerio/versions/${VERSION}.json" + status=$(curl -s -o /dev/null -w '%{http_code}' --max-time 20 "$url" || true) + if [ "$status" = "200" ]; then + echo "detail=The gem was uploaded, but RubyGems did not finish serving it within 5 minutes." >> "$GITHUB_OUTPUT" + else + echo "detail=RubyGems does not list the gem yet." >> "$GITHUB_OUTPUT" + fi + - name: Notify Slack of failed release if: failure() && env.SLACK_WEBHOOK_URL != '' uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0 @@ -87,7 +104,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "*Ruby* SDK release :warning: failure :warning:\nView to learn why." + "text": "*Ruby* SDK release :warning: failure :warning:\n${{ steps.uploaded.outputs.detail || 'It failed before the publish step.' }}\nView to learn why." } } ] From 6c633cb92e368a0faa4ecc94faacf8fef0aab84e Mon Sep 17 00:00:00 2001 From: sydneycollins-cio <149523950+sydneycollins-cio@users.noreply.github.com> Date: Wed, 25 Nov 2026 13:57:04 -0500 Subject: [PATCH 7/7] ci: re-run checks Co-Authored-By: Claude Fable 5.2