Use ruby/ruby's make-snapshot composite action#126
Merged
Conversation
Drop the inlined apt setup, ruby/ruby clone, fetch, and tool/make-snapshot invocation; call ruby/ruby/.github/actions/make- snapshot@master instead. Pass upload-artifact: false so that the matrix entries do not collide on the shared "Packages" artifact name—the S3 step is the only consumer of the produced tarball here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the inlined apt setup, ruby/ruby clone, tag fetch, and tool/make-snapshot call in draft-release.yml with a single ruby/ruby/.github/actions/make-snapshot@master step. The tag-ref derivation stays in the info step and is forwarded via the fetch-branch input (the composite's "git fetch +X:X" handles tag refspecs as well as branches). upload-artifact stays at its default true so the downstream ubuntu/macos/windows test jobs can still download the Packages artifact. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors snapshot/package generation workflows to use the upstream ruby/ruby composite action (.github/actions/make-snapshot) instead of inlining the install/clone/fetch/make-snapshot steps, and adjusts the draft-release workflow’s version/ref derivation outputs accordingly.
Changes:
- Replace manual snapshot creation steps with
ruby/ruby/.github/actions/make-snapshot. - Update draft-release version/ref computation to output
target_version/fetch_reffor the snapshot step. - Update Slack notification strings to reference the new output key (but currently inconsistently across jobs).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| .github/workflows/upload-tarball.yml | Switch snapshot creation to the ruby/ruby make-snapshot composite action. |
| .github/workflows/draft-release.yml | Switch pkg creation to the composite action and adjust version/ref outputs and notification strings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+57
to
+62
| - uses: ruby/ruby/.github/actions/make-snapshot@master | ||
| with: | ||
| archname: ${{ matrix.archname }} | ||
| version: ${{ matrix.version }} | ||
| fetch-branch: ${{ matrix.fetch_branch }} | ||
| upload-artifact: 'false' |
Comment on lines
+47
to
+51
| - uses: ruby/ruby/.github/actions/make-snapshot@master | ||
| with: | ||
| name: Info | ||
| path: pkg/info | ||
| archname: ruby-${{ steps.info.outputs.target_version }} | ||
| version: ${{ steps.info.outputs.target_version }} | ||
| fetch-branch: ${{ steps.info.outputs.fetch_ref }} |
Comment on lines
215
to
233
| - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 | ||
| with: | ||
| payload: | | ||
| { | ||
| "attachments": [{ | ||
| "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.TARGET_VERSION }}>", | ||
| "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.target_version }}>", | ||
| "color": "danger" | ||
| }] | ||
| } | ||
| env: | ||
| SLACK_WEBHOOK_URL: ${{ secrets.SNAPSHOT_SLACK_WEBHOOK_URL }} | ||
| if: failure() | ||
| - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 | ||
| with: | ||
| payload: | | ||
| { | ||
| "attachments": [{ | ||
| "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.TARGET_VERSION }}>", | ||
| "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.target_version }}>", | ||
| "color": "good" |
Comment on lines
333
to
351
| - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 | ||
| with: | ||
| payload: | | ||
| { | ||
| "attachments": [{ | ||
| "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.TARGET_VERSION }}>", | ||
| "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.target_version }}>", | ||
| "color": "danger" | ||
| }] | ||
| } | ||
| env: | ||
| SLACK_WEBHOOK_URL: ${{ secrets.SNAPSHOT_SLACK_WEBHOOK_URL }} | ||
| if: failure() | ||
| - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 | ||
| with: | ||
| payload: | | ||
| { | ||
| "attachments": [{ | ||
| "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.TARGET_VERSION }}>", | ||
| "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.target_version }}>", | ||
| "color": "good" |
Comment on lines
480
to
498
| - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 | ||
| with: | ||
| payload: | | ||
| { | ||
| "attachments": [{ | ||
| "text": "${{ job.status }}: ${{ matrix.os }} (vs${{ matrix.vs }}) / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.TARGET_VERSION }}>", | ||
| "text": "${{ job.status }}: ${{ matrix.os }} (vs${{ matrix.vs }}) / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.target_version }}>", | ||
| "color": "danger" | ||
| }] | ||
| } | ||
| env: | ||
| SLACK_WEBHOOK_URL: ${{ secrets.SNAPSHOT_SLACK_WEBHOOK_URL }} | ||
| if: failure() | ||
| - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 | ||
| with: | ||
| payload: | | ||
| { | ||
| "attachments": [{ | ||
| "text": "${{ job.status }}: ${{ matrix.os }} (vs${{ matrix.vs }}) / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.TARGET_VERSION }}>", | ||
| "text": "${{ job.status }}: ${{ matrix.os }} (vs${{ matrix.vs }}) / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }} at ${{ steps.info.outputs.target_version }}>", | ||
| "color": "good" |
Comment on lines
+27
to
+31
| if ruby -e "major = Integer('${TARGET_VERSION}'.split('.', 2).first); exit(major>=4)"; then | ||
| FETCH_REF="refs/tags/v${TARGET_VERSION}" | ||
| else | ||
| FETCH_REF="refs/tags/v$(echo $TARGET_VERSION | sed 'y/.-/__/')" | ||
| fi |
The ubuntu/macos/windows jobs each have their own Set TARGET_VERSION step that emits TARGET_VERSION (uppercase) to GITHUB_OUTPUT, while the Slack payloads now reference steps.info.outputs.target_version (lowercase) to match the make-snapshot job. Switch every info step to emit target_version so the Slack references resolve correctly across all jobs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
hsbt
added a commit
that referenced
this pull request
May 21, 2026
The per-OS test bodies that were inlined in draft-release move to
ruby/ruby/.github/workflows/tarball-{ubuntu,macos,windows}.yml,
matching the daily snapshot pipeline. The info logic is split out
into its own job so every downstream job can read the derived
TARGET_VERSION, archname, branch, and fetch_ref via
needs.info.outputs.
The tarball job keeps using ruby/ruby's make-snapshot composite
action (from #126) and passes fetch_ref through fetch-branch — the
composite's `git fetch +X:X` handles tag refspecs as well as branch
names.
GitHub Actions cannot interpolate the ref in uses: org/repo/path@ref,
so the per-OS tests are enumerated as job blocks grouped by branch
(master / ruby_4_0 / ruby_3_4 / ruby_3_3) and gated by
needs.info.outputs.branch. Add or drop a whole branch as one block.
Preview tags route to master.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.