Skip to content

Add executables to Gem definition #17

Add executables to Gem definition

Add executables to Gem definition #17

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
ruby: ['2.7', '3.0', '3.2']
runs-on: ${{ matrix.os }}-latest
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: bundle install
- run: bundle exec rake test
coverage-test:
runs-on: ubuntu-latest
name: Coverage tests
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.3
- run: bundle install
- run: bundle exec rake test
env:
REMOTE_TESTS: true
- uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: "${{ secrets.CC_GFA_REPORTER_ID }}"
with:
coverageCommand: bundle exec codeclimate-test-reporter
publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [test, coverage-test]
runs-on: ubuntu-latest
name: Release new version
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Check release candidates
id: release
run: |
gem_version="$(ruby -r rubygems -e "puts Gem::Specification::load('$(ls *.gemspec)').version")"
unset STABLE
[[ "$gem_version" == *.rc* ]] || STABLE='true'
echo "STABLE=${STABLE}" >> $GITHUB_OUTPUT
- name: Tag and deploy
uses: discourse/publish-rubygems-action@v2
if: steps.release.outputs.STABLE
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
GIT_EMAIL: bot@rodriguez-r.com
GIT_NAME: Automated Release