Skip to content

[1.2.1] Allow disabling default method and param placeholder text (#16) #121

[1.2.1] Allow disabling default method and param placeholder text (#16)

[1.2.1] Allow disabling default method and param placeholder text (#16) #121

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
tags:
- "v*"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 4.0 ]
env:
BUNDLE_GEMFILE: ${{ matrix.ruby == '2.7' && 'Gemfile_2_7' || 'Gemfile' }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Docscribe (check docs are up-to-date)
env:
BUNDLE_GEMFILE: 'Gemfile'
run: |
cd test_project
bundle install
FILES="$(cd .. && git ls-files 'lib/**/*.rb' | sed 's|^|../|')"
bundle exec docscribe $FILES -C ../docscribe.yml
- name: RuboCop (self‑check)
run: bundle exec rubocop
- name: RSpec
run: bundle exec rspec
release:
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Get gem name
id: gem_name
run: |
GEM_NAME=$(ruby -e "require 'rubygems'; spec = Gem::Specification.load(Dir.glob('*.gemspec').first); puts spec.name")
echo "gem_name=$GEM_NAME" >> $GITHUB_OUTPUT
- name: Build gem
run: |
gem build *.gemspec
if [ ! -f ${{ steps.gem_name.outputs.gem_name }}-*.gem ]; then
echo "Gem build failed!"
exit 1
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.gem_name.outputs.gem_name }}-*.gem
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push gem to RubyGems.org
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: gem push ${{ steps.gem_name.outputs.gem_name }}-*.gem
- name: Deploy Documentation
if: success()
run: |
git clone git@github.com:unurgunite/${{ steps.gem_name.outputs.gem_name }}_docs.git ../${{ steps.gem_name.outputs.gem_name }}_docs
bundle exec rake docs:deploy
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock