-
Notifications
You must be signed in to change notification settings - Fork 11
Ruby GitHub Actions Guidelines
Martin Makarský edited this page May 12, 2021
·
1 revision
The action runs with the GitHub release. The action installs dependencies, runs tests, and publishes gem to Rubygems.
- It's recommended to use Linux machine for building -
jobs.<name>.runs-on
property. - For publishing, the action uses 3rd party dawidd6/action-publish-gem@v1 action.
- The SDK uses GitHub releases.
name: publish-gem
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake
- name: Publish gem
uses: dawidd6/action-publish-gem@v1
with:
api_key: ${{secrets.RUBYGEMS_API_KEY}}