Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches:
- main
workflow_dispatch:
inputs:
tag:
description: "Existing release tag to publish to RubyGems (e.g. v3.9.1)"
required: false
type: string

permissions:
contents: read
Expand All @@ -28,26 +33,29 @@ jobs:
# Uses GITHUB_TOKEN, so CI does not run on the release PR by itself.
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
id: release
# A manual tag publish must not create a newer release it then skips publishing.
if: inputs.tag == ''

# RubyGems trusted publishing is tied to this workflow file, so publish stays here.
publish:
name: Publish to RubyGems
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
if: needs.release-please.outputs.release_created == 'true' || inputs.tag != ''
runs-on: ubuntu-24.04
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v7
with:
ref: ${{ needs.release-please.outputs.tag_name }}
ref: ${{ inputs.tag || needs.release-please.outputs.tag_name }}
Comment thread
jonathannorris marked this conversation as resolved.
Resolved

- name: Set up Ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: ruby
# wasmtime has no prebuilt gem for Ruby 4.0 yet
ruby-version: "3.4"
bundler-cache: true

# The release tag already exists, so `rake release` skips tagging and only pushes the gem.
Expand Down