Skip to content
Merged
Show file tree
Hide file tree
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
25 changes: 16 additions & 9 deletions .github/workflows/create-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
branches:
- main
workflow_dispatch:
inputs:
retry_publish:
description: "Retry publishing the current gem version to RubyGems without creating a new GitHub release."
required: false
default: false
type: boolean

jobs:
release:
Expand All @@ -17,28 +23,29 @@ jobs:

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
# Avoid persisting the default GITHUB_TOKEN; the RubyGems release action
# configures the credentials it needs only when a release is published.
persist-credentials: false

- uses: stainless-api/trigger-release-please@bb6677c5a04578eec1ccfd9e1913b5b78ed64c61 # v1.4.0
if: ${{ github.event.inputs.retry_publish != 'true' }}
id: release
with:
repo: ${{ github.event.repository.full_name }}
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

- name: Set up Ruby
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == 'true' || github.event.inputs.retry_publish == 'true' }}
uses: ruby/setup-ruby@c515ec17f69368147deb311832da000dd229d338 # v1
with:
bundler-cache: false
ruby-version: '3.2'

- run: |
- if: ${{ steps.release.outputs.releases_created == 'true' || github.event.inputs.retry_publish == 'true' }}
run: |
bundle install

- name: Publish to RubyGems.org
if: ${{ steps.release.outputs.releases_created }}
run: |
bash ./bin/publish-gem
env:
# `RUBYGEMS_HOST` is only required for private gem repositories, not https://rubygems.org
RUBYGEMS_HOST: ${{ secrets.OPENAI_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }}
GEM_HOST_API_KEY: ${{ secrets.OPENAI_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }}
if: ${{ steps.release.outputs.releases_created == 'true' || github.event.inputs.retry_publish == 'true' }}
uses: rubygems/release-gem@6317d8d1f7e28c24d28f6eff169ea854948bd9f7 # v1.2.0
27 changes: 0 additions & 27 deletions .github/workflows/publish-gem.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.66.0"
".": "0.66.1"
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.66.1 (2026-06-04)

Full Changelog: [v0.66.0...v0.66.1](https://github.com/openai/openai-ruby/compare/v0.66.0...v0.66.1)

## 0.66.0 (2026-06-03)

Full Changelog: [v0.65.0...v0.66.0](https://github.com/openai/openai-ruby/compare/v0.65.0...v0.66.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
openai (0.66.0)
openai (0.66.1)
base64
cgi
connection_pool
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "openai", "~> 0.66.0"
gem "openai", "~> 0.66.1"
```

<!-- x-release-please-end -->
Expand Down
14 changes: 10 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ require "rubocop/rake_task"
tapioca = "sorbet/tapioca"
examples = "examples"
ignore_file = ".ignore"
pkg = "pkg"

FILES_ENV = "FORMAT_FILE"

CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/ doc/], *FileList["*.gem"], ignore_file)
CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/ doc/], *FileList["*.gem"], pkg, ignore_file)

CLOBBER.push(*%w[sorbet/rbi/annotations/ sorbet/rbi/gems/], tapioca)

Expand Down Expand Up @@ -131,6 +132,7 @@ multitask(:"typecheck:steep") do
end

directory(examples)
directory(pkg)

desc("Typecheck `*.rbi`")
multitask("typecheck:sorbet": examples) do
Expand All @@ -153,7 +155,7 @@ multitask(:"build:docs") do
end

desc("Build ruby gem")
multitask(:"build:gem") do
multitask(:"build:gem" => pkg) do
# optimizing for grepping through the gem bundle: many tools honour `.ignore` files, including VSCode
#
# both `rbi` and `sig` directories are navigable by their respective tool chains and therefore can be ignored by tools such as `rg`
Expand All @@ -162,11 +164,15 @@ multitask(:"build:gem") do
sig/*
GLOB

sh(*%w[gem build -- openai.gemspec])
# RubyGems' release-gem action waits for pkg/*.gem after running rake release,
# so build with RubyGems' normal versioned filename and move the artifact there.
rm_rf(FileList["*.gem", "#{pkg}/*.gem"])
sh(*%w[gem build openai.gemspec])
mv(*FileList["*.gem"], pkg)
rm_rf(ignore_file)
end

desc("Release ruby gem")
multitask(release: [:"build:gem"]) do
sh(*%w[gem push], *FileList["*.gem"])
sh(*%w[gem push], *FileList["#{pkg}/*.gem"])
end
9 changes: 0 additions & 9 deletions bin/publish-gem

This file was deleted.

2 changes: 1 addition & 1 deletion lib/openai/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module OpenAI
VERSION = "0.66.0"
VERSION = "0.66.1"
end
2 changes: 1 addition & 1 deletion openai.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |s|
s.homepage = "https://gemdocs.org/gems/openai"
s.metadata["homepage_uri"] = s.homepage
s.metadata["source_code_uri"] = "https://github.com/openai/openai-ruby"
s.metadata["rubygems_mfa_required"] = false.to_s
s.metadata["rubygems_mfa_required"] = "true"
s.required_ruby_version = ">= 3.2.0"
s.license = "Apache-2.0"

Expand Down