Skip to content

Commit

Permalink
Make secrets.rubygems_api_key optional in ruby (#14)
Browse files Browse the repository at this point in the history
These secrets are only used when the gem is supposed to be released to
rubygems
  • Loading branch information
xjunior authored Oct 8, 2024
1 parent 771bee5 commit a54f5c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ruby-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
workflow_call:
secrets:
rubygems_api_key:
required: true
required: false
inputs:
before_build:
type: string
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
release:
needs: [build, license-compliance]
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'refs/tags/v') && contains(github.ref, inputs.package) }}
if: ${{ secrets.rubygems_api_key != '' && contains(github.ref, 'refs/tags/v') && contains(github.ref, inputs.package) }}
steps:
- uses: actions/checkout@v3
- uses: cadwallion/publish-rubygems-action@master
Expand Down
6 changes: 3 additions & 3 deletions docs/ruby-gem.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:
The following secrets are expected to be available:
| **Secret** | **Required** |
| ---------------- | ------------ |
| rubygems_api_key | true |
| **Secret** | **Required** |
| ---------------- | ------------------ |
| rubygems_api_key | true, if releasing |

0 comments on commit a54f5c1

Please sign in to comment.