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

Fix specs

Fix specs #144

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- '**'
tags:
- '**'
jobs:
build:
name: Continuous Integration
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ "3.3" ]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential cmake git tar
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Test
run: bundle exec rspec --profile 10 --format progress
- name: Lint
run: bundle exec rubocop --parallel --display-cop-names
- name: Type check
run: bundle exec srb tc
release:
name: Release application
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Set version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Publish to RubyGems
run: |
mkdir -p ~/.gem
touch ~/.gem/credentials
chmod 0600 ~/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > ~/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
- name: Create Github Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Gem ${{ github.event.repository.name }} ${{ env.VERSION }} was released