Skip to content

Commit

Permalink
Merge pull request #2 from sergiobayona/4-set-up-package-publishing
Browse files Browse the repository at this point in the history
github actions for building and releasing the gem
  • Loading branch information
sergiobayona authored Apr 20, 2024
2 parents 5f2ffe7 + 34e179e commit ae37fcb
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .github/workflows/push_gem.yml
jobs:
push:
name: Push gem to RubyGems.org
runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

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

# Release
- uses: rubygems/release-gem@v1

28 changes: 28 additions & 0 deletions .github/workflows/gem-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Gem Release

on:
pull_request:
branches: [ "main" ]
types:
- closed
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

environment: release

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

# Release
- uses: rubygems/release-gem@v1

0 comments on commit ae37fcb

Please sign in to comment.