Skip to content

Commit

Permalink
feat: added workflow for deploying gem to RubyGems on merge to main
Browse files Browse the repository at this point in the history
  • Loading branch information
alexo committed Jan 2, 2024
1 parent 53e4022 commit ffc8673
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Ruby

on:
push:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [ 3.1, 3.2, 3.3 ]

steps:
- uses: actions/checkout@v4

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

- name: Run tests
run: bundle exec rake

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

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true

- name: Publish to RubyGems
run: |
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: ${{ secrets.PARALLEL_RP_RUBYGEMS_AUTH_TOKEN }}
12 changes: 8 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,26 @@

name: Ruby

on: [push]
on:
push:
branches-ignore: [ master ]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.6', '2.7', '3.0']
ruby-version: [ 3.1, 3.2, 3.3 ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
bundler-cache: true

- name: Run tests
run: bundle exec rake
2 changes: 1 addition & 1 deletion lib/parallel_report_portal/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ParallelReportPortal
VERSION = "3.0.0"
VERSION = "3.0.1"
end

0 comments on commit ffc8673

Please sign in to comment.