Sha256: 38ff89885967cb47b98f20194817ccd428fea8485e92362a32adc526b6c5147b

Contents?: true

Size: 1.73 KB

Versions: 1

Compression:

Stored size: 1.73 KB

Contents

name: test-and-release

on:
  push:
    branches: [ main ]
    tags: [ 'v*' ]
  pull_request:

concurrency:
  group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
  cancel-in-progress: true

jobs:
  test:
    name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    continue-on-error: false
    strategy:
      fail-fast: false
      matrix:
        ruby: [ '2.6', '2.7', '3.0', '3.1' ]
        os: [ ubuntu-18.04, ubuntu-latest, windows-latest, macos-latest ]

    steps:
      - uses: actions/checkout@v3

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true

      - if: matrix.os == 'macos-latest'
        run: brew install lcdf-typetools

      - if: matrix.os == 'macos-latest'
        run: bundle exec rspec
        env:
          TEST_ENV: CI

      - if: matrix.os != 'macos-latest'
        run: bundle exec rspec --tag ~dev
        env:
          TEST_ENV: CI

  archlinux-test:
    name: Test on Arch Linux
    runs-on: ubuntu-latest
    container:
      image: 'archlinux:latest'
    continue-on-error: false
    strategy:
      fail-fast: false

    steps:
      - uses: actions/checkout@v3

      - name: Setup packages
        run: pacman -Syu --noconfirm git ruby binutils gcc autoconf make libffi

      - run: bundle install

      - name: Test
        run: bundle exec rspec --tag ~dev

  release:
    name: Release gem
    needs: [ test, archlinux-test ]
    runs-on: ubuntu-latest
    if: contains(github.ref, 'refs/tags/v')
    steps:
      - uses: actions/checkout@v3

      - uses: cadwallion/publish-rubygems-action@master
        env:
          RUBYGEMS_API_KEY: ${{secrets.FONTIST_CI_RUBYGEMS_API_KEY}}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fontist-1.14.5 .github/workflows/test-and-release.yml