Skip to content

Commit

Permalink
chore: update gh gem-push flow
Browse files Browse the repository at this point in the history
  • Loading branch information
gierschv committed Mar 8, 2024
1 parent 5817878 commit 529c2e4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Ruby Gem
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
Expand All @@ -15,12 +13,20 @@ jobs:
packages: write

steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
release-type: ruby
package-name: contrived_math
bump-minor-pre-major: true
version-file: "lib/flat_api/version.rb"
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
- name: Set up Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3

if: ${{ steps.release.outputs.release_created }}
- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
Expand All @@ -32,7 +38,7 @@ jobs:
env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }}

if: ${{ steps.release.outputs.release_created }}
- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
Expand All @@ -43,3 +49,4 @@ jobs:
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
if: ${{ steps.release.outputs.release_created }}

0 comments on commit 529c2e4

Please sign in to comment.