Sha256: 6a929c9bbd2b128388e3a9bf838676296d6c058d44a3608a65b5c0d09306abeb

Contents?: true

Size: 1.64 KB

Versions: 5

Compression:

Stored size: 1.64 KB

Contents

name: Test and Release

on:
  push:
    branches:
      - main

jobs:
  tests:
    strategy:
      matrix:
        ruby: [2.6, 2.7, 3.0]
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run linter
        run: bundle exec rubocop
      - name: Run tests
        run: bundle exec rspec
  prettier:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Node
        uses: actions/setup-node@v2
        with:
          node-version: '14'
      - name: Install yarn dep
        run: yarn install
      - name: Check prettier
        run: yarn prettier -c '**/*.rb'
  release:
    needs: [tests, prettier]
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.0
          bundler-cache: true
      - name: Prepare credentials
        env:
          RUBYGEM_KEY: ${{ secrets.RUBYGEM_KEY }}
        run: "mkdir -p ~/.gem && echo -e \"---\\r\\n:rubygems_api_key: $RUBYGEM_KEY\" > ~/.gem/credentials && chmod 0600 ~/.gem/credentials"
      - name: Setup username/email
        run: 'git config --global user.email zaratan@hey.com && git config --global user.name "Denis <Zaratan> Pasin"'
      - name: Fetch tags from remote
        run: 'git fetch -t'
      - name: Publish if version change
        run: 'git diff `git tag | tail -1` -- lib/shotgrid_api_ruby/version.rb | grep -E "^\+.*VERSION" && rake release || echo "No release for now"'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shotgrid_api_ruby-0.1.3.3 .github/workflows/test_and_publish.yml
shotgrid_api_ruby-0.1.3.2 .github/workflows/test_and_publish.yml
shotgrid_api_ruby-0.1.3.1 .github/workflows/test_and_publish.yml
shotgrid_api_ruby-0.1.3 .github/workflows/test_and_publish.yml
shotgrid_api_ruby-0.1.2 .github/workflows/test_and_publish.yml