Skip to content

Template changes

Template changes #91

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- master
env:
RUBYGEM_PUBLISH_API_KEY: ${{ secrets.RUBYGEM_PUBLISH_API_KEY }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
faraday-version:
- '2.0'
ruby-version:
- '2.6'
- '2.7'
- '3.1'
- '3.2'
env:
FARADAY_VERSION: ${{ matrix.faraday-version }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- run: bundle install && bundle exec rspec
publish:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: $RUBYGEM_PUBLISH_API_KEY\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem