Skip to content

Release SDK - Publish Gem #4

Release SDK - Publish Gem

Release SDK - Publish Gem #4

Workflow file for this run

name: Release SDK
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Validate gemspec
run: gem build mercadopago.gemspec
- name: Login to RubyGems
run: gem signin --api-key ${{ secrets.RUBYGEMS_API_KEY }}
- name: Build and Push Gem
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
gem build mercadopago.gemspec
gem_file=$(ls mercadopago-*.gem)
echo "Publishing $gem_file..."
gem push "$gem_file"