Skip to content

Commit

Permalink
chore: add publish gem version on github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
aristotelesbr committed Sep 29, 2024
1 parent 38acdf7 commit 705bc52
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish Gem

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.2'

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true

- name: Install bundler
run: gem install bundler

- name: Install dependencies
run: bundle install

- name: Build gem
run: gem build lennarb.gemspec

- name: Push gem to RubyGems
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
gem push lennarb-*.gem

0 comments on commit 705bc52

Please sign in to comment.