Sha256: 219719feacf584b60289021a2ea4542d01502eacba719a1cf3b0a3a4e64238c5

Contents?: true

Size: 1.72 KB

Versions: 12

Compression:

Stored size: 1.72 KB

Contents

name: Release

on:
  push:
    branches: [ master ]

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

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby
        # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
        # change this to (see https://github.com/ruby/setup-ruby#versioning):
        # uses: ruby/setup-ruby@v1
        uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: false # runs 'bundle install' and caches installed gems automatically
      - name: Install gems
        run: bundle install
      - name: Run tests
        run: bundle exec rspec

  tag:
    needs: test
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Tag automatically
        run: git tag v`cat lib/opera/version.rb | grep 'VERSION' | awk '{ print $3 $4 }' | sed "s/'//g"`

      - name: Push tags
        run: git push origin --tags

  publish:
    needs: tag
    name: Build + Publish
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby 2.6
        uses: actions/setup-ruby@v1
        with:
          ruby-version: 2.6.x

      - 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.RUBYGEMS_AUTH_TOKEN}}"

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
opera-0.2.13 .github/workflows/release.yml
opera-0.2.12 .github/workflows/release.yml
opera-0.2.11 .github/workflows/release.yml
opera-0.2.10 .github/workflows/release.yml
opera-0.2.9 .github/workflows/release.yml
opera-0.2.8 .github/workflows/release.yml
opera-0.2.7 .github/workflows/release.yml
opera-0.2.6 .github/workflows/release.yml
opera-0.2.5 .github/workflows/release.yml
opera-0.2.4 .github/workflows/release.yml
opera-0.2.3 .github/workflows/release.yml
opera-0.2.2 .github/workflows/release.yml