Skip to content

Re-use tarball-test workflows on ruby/ruby repository#125

Open
hsbt wants to merge 1 commit into
masterfrom
reuse-tarball-test
Open

Re-use tarball-test workflows on ruby/ruby repository#125
hsbt wants to merge 1 commit into
masterfrom
reuse-tarball-test

Conversation

@hsbt
Copy link
Copy Markdown
Member

@hsbt hsbt commented May 20, 2026

The current draft-release.yml workflow has inline build and test steps. If we changed build or test step at ruby/ruby repository, we need to sync that step to this repository.

This change uses the same step provided by ruby/ruby repository by re-using feature. It makes to consolidate our build and test steps in one repository.

Copilot AI review requested due to automatic review settings May 20, 2026 08:28
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 the draft release packaging workflow to reuse the tarball-* reusable workflows from ruby/ruby, aiming to centralize and reduce duplication of build/test steps across repositories.

Changes:

  • Introduce an info job to derive TARGET_VERSION, archname, and the corresponding ruby/ruby branch.
  • Split out tarball creation/upload into a dedicated tarball job and adjust naming to use archname.
  • Replace inline per-OS build/test matrices with per-branch reusable workflow calls to ruby/ruby/.github/workflows/tarball-{ubuntu,macos,windows}.yml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/draft-release.yml Outdated
Comment on lines 72 to 76
if ruby -e "major = Integer('${TARGET_VERSION}'.split('.', 2).first); exit(major>=4)"; then
GITHUB_REF_RUBY_RUBY="refs/tags/v${TARGET_VERSION}"
FETCH_REF="refs/tags/v${TARGET_VERSION}"
else
GITHUB_REF_RUBY_RUBY="refs/tags/v$(echo $TARGET_VERSION | sed 'y/.-/__/')"
FETCH_REF="refs/tags/v$(echo $TARGET_VERSION | sed 'y/.-/__/')"
fi
MINOR=$(echo "$TARGET_VERSION" | cut -d. -f2)
BRANCH="ruby_${MAJOR}_${MINOR}"
;;
esac
Comment on lines +131 to +141
ubuntu-master:
needs: [info, tarball]
if: needs.info.outputs.branch == 'master'
uses: ruby/ruby/.github/workflows/tarball-ubuntu.yml@master
with:
archname: ${{ needs.info.outputs.archname }}
allow-failures: power_assert
remove-gnupg: true
notify-ruby-sha: true
branch-label: master
secrets: inherit
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>
@hsbt hsbt force-pushed the reuse-tarball-test branch from c8ba5cf to 84e3869 Compare May 21, 2026 06:52
@hsbt
Copy link
Copy Markdown
Member Author

hsbt commented May 21, 2026

I will merge this after confirming to work with ruby_3_3 branch and new tag.

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