Sha256: ba4ebb106f1d6c7e175b71255bd3d57815fd32880f5b9145d8eaef01200fc78f

Contents?: true

Size: 1.98 KB

Versions: 2

Compression:

Stored size: 1.98 KB

Contents

name: Test and Deploy
on:
  push:
  pull_request:
  release:
    types: [created]
jobs:
  rubocop:
    strategy:
      matrix:
        ruby-version: [2.6.3, 2.6.6, 2.7.1]
    runs-on: [ubuntu-latest]
    steps:
      - uses: actions/checkout@v2
        with:
          persist-credentials: false
          fetch-depth: 0
      - name: Ruby Setup and Bundle
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true
      - run: bundle exec rubocop
  rspec:
    strategy:
      matrix:
        ruby-version: [2.6.3, 2.6.6, 2.7.1]
    runs-on: [ubuntu-latest]
    steps:
      - uses: actions/checkout@v2
        with:
          persist-credentials: false
          fetch-depth: 0
      - name: Ruby Setup and Bundle
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true
      - name: rspec and report to coveralls
        run: bundle exec rspec --order rand
      - name: Coveralls
        uses: coverallsapp/github-action@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          parallel: true
          flag-name: run-${{ matrix.ruby-version }}
  publish:
    runs-on: ubuntu-latest
    needs: ['rubocop', 'rspec']
    if: github.event_name == 'release' && github.event.action == 'created'
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          persist-credentials: false
          fetch-depth: 0
      - name: Ruby Setup and Bundle
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7.1
          bundler-cache: true
      - 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.RUBY_GEM_KEY }}"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ledger_sync-2.0.2 .github/workflows/gem-workflow.yml
ledger_sync-2.0.1 .github/workflows/gem-workflow.yml