Skip to content

Commit

Permalink
github actions fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amancevice committed Sep 7, 2023
1 parent 3fdb91d commit 3f6b91c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
6 changes: 0 additions & 6 deletions .github/actions/setup-rubygems/action.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
name: Setup RubyGems
description: Setup RubyGems credentials
inputs:
ruby-version:
description: Ruby version
required: true
rubygems_api_key:
description: RubyGems API key
required: true
runs:
using: composite
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
- run: mkdir -p ~/.gem
shell: bash
- run: |
Expand Down
8 changes: 1 addition & 7 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
name: Test
description: Run tests
inputs:
ruby-version:
description: Ruby version
required: true
activesupport-version:
description: ActiveSupport version constraint
required: true
runs:
using: composite
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
- run: gem install activesupport -v "~> ${{ inputs.activesupport-version }}"
- run: bundle add activesupport -v '${{ inputs.activesupport-version }}'
shell: bash
- run: bundle install
shell: bash
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,42 @@ on:
jobs:
test:
name: >-
Ruby ${{ matrix.ruby }}, ActiveSupport ~> ${{ matrix.activesupport }}
Test
[Ruby ${{ matrix.ruby-version }},
ActiveSupport ${{ matrix.activesupport-version }}]
runs-on: ubuntu-latest
strategy:
matrix:
activesupport:
- "3.2"
- "4.0"
- "5.0"
- "6.0"
- "7.0"
ruby:
activesupport-version:
- ~> 3.2
- ~> 4.0
- ~> 5.0
- ~> 6.0
- ~> 7.0
ruby-version:
- "3.1"
- "3.2"
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- uses: ./.github/actions/test
with:
ruby-version: ${{ matrix.ruby }}
activesupport-version: ${{ matrix.activesupport }}
activesupport-version: ${{ matrix.activesupport-version }}
push:
name: Publish Gem
if: ${{ github.event.release }}
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-rubygems
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- uses: ./.github/actions/setup-rubygems
with:
rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
- run: bundle install
- run: bundle exec rake gem:push

0 comments on commit 3f6b91c

Please sign in to comment.