Skip to content

Commit a54f5c1

Browse files
authored
Make secrets.rubygems_api_key optional in ruby (#14)
These secrets are only used when the gem is supposed to be released to rubygems
1 parent 771bee5 commit a54f5c1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/ruby-gem.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ on:
22
workflow_call:
33
secrets:
44
rubygems_api_key:
5-
required: true
5+
required: false
66
inputs:
77
before_build:
88
type: string
@@ -61,7 +61,7 @@ jobs:
6161
release:
6262
needs: [build, license-compliance]
6363
runs-on: ubuntu-latest
64-
if: ${{ contains(github.ref, 'refs/tags/v') && contains(github.ref, inputs.package) }}
64+
if: ${{ secrets.rubygems_api_key != '' && contains(github.ref, 'refs/tags/v') && contains(github.ref, inputs.package) }}
6565
steps:
6666
- uses: actions/checkout@v3
6767
- uses: cadwallion/publish-rubygems-action@master

docs/ruby-gem.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444
4545
The following secrets are expected to be available:
4646
47-
| **Secret** | **Required** |
48-
| ---------------- | ------------ |
49-
| rubygems_api_key | true |
47+
| **Secret** | **Required** |
48+
| ---------------- | ------------------ |
49+
| rubygems_api_key | true, if releasing |

0 commit comments

Comments
 (0)