on:
  workflow_dispatch:

name: Release Ruby SDK

jobs:
  release-sdks:
    name: release-ruby
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Setup Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: '3.1' # Version range or exact version of a Ruby version to use, using semvers version range syntax.

      - name: Publish Ruby Gem
        env:
          RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_TOKEN }}
        run: |
          cd ruby
          make publish RUBYGEMS_API_KEY=$RUBYGEMS_API_KEY
      