Skip to content
40 changes: 40 additions & 0 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Ruby Gem

on:
push:
branches: [ "release" ]
pull_request:
branches: [ "release" ]

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up Ruby 2.5.8
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5.8

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
# gem push *.gem
- name: upload gem file
uses: actions/upload-artifact@v4
with:
name: gemspec
path: ./*.gem

2 changes: 1 addition & 1 deletion spec/integrations/push_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
end

treatment = 'control'
for i in 1..5 do
for i in 1..10 do
sleep(1)
treatment = client.get_treatment('admin', 'bilal_split')
break if treatment != 'control'
Expand Down