Skip to content

Use ruby/ruby's make-snapshot composite action#126

Merged
hsbt merged 3 commits into
masterfrom
use-ruby-make-snapshot-composite
May 21, 2026
Merged

Use ruby/ruby's make-snapshot composite action#126
hsbt merged 3 commits into
masterfrom
use-ruby-make-snapshot-composite

Conversation

@hsbt
Copy link
Copy Markdown
Member

@hsbt hsbt commented May 21, 2026

No description provided.

hsbt and others added 2 commits May 21, 2026 14:32
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>
Copilot AI review requested due to automatic review settings May 21, 2026 05:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ref for 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 hsbt merged commit 51dbd96 into master May 21, 2026
@hsbt hsbt deleted the use-ruby-make-snapshot-composite branch May 21, 2026 06:45
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants