Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

v0.4.0

v0.4.0 #6

Workflow file for this run

---
name: CD
on:
release:
types:
- published
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- 3.2
name: Ruby-${{matrix.ruby}}
steps:
- name: Check out
uses: actions/checkout@v2
- name: Setup ruby and bundle
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rspec
- name: Run Rubocop
run: bundle exec rubocop
release:
runs-on: ubuntu-latest
name: Release to RubyGems
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install --jobs 4 --retry 3
- 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
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"