Skip to content

Commit 930a304

Browse files
authored
ci: fix release steps (#33)
## This PR - Updates the release please step to hardcode the current minor of Ruby and add releasing. We need to add the RUBY_GEM_API_TOKEN secret here that we use for the primary SDK gem. Signed-off-by: Max VelDink <[email protected]>
1 parent 6b63b49 commit 930a304

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

.github/workflows/release-please.yml

+15-10
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ jobs:
2020
default-branch: main
2121
signoff: "OpenFeature Bot <[email protected]>"
2222

23-
- name: Dump Release Please Output
24-
env:
25-
RELEASE_PLEASE_OUTPUT: ${{ toJson(steps.release.outputs) }}
26-
run: |
27-
echo "$RELEASE_PLEASE_OUTPUT"
28-
2923
outputs:
3024
all: ${{ toJSON(steps.release.outputs) }}
3125
paths_released: ${{ steps.release.outputs.paths_released }}
@@ -48,12 +42,23 @@ jobs:
4842
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
4943
with:
5044
ref: ${{ env.TAG }}
51-
45+
5246
- name: Set up Ruby
5347
uses: ruby/setup-ruby@v1
5448
with:
55-
# TODO see if the ruby version matter for publishing
56-
# ruby-version: ${{ matrix.ruby-version }}
49+
ruby-version: 3.3
5750
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
5851

59-
## TODO add a step to publish the gem
52+
- name: Release Gem
53+
run: |
54+
gem install bundler
55+
bundle config unset deployment
56+
bundle install
57+
mkdir -p $HOME/.gem
58+
touch $HOME/.gem/credentials
59+
chmod 0600 $HOME/.gem/credentials
60+
printf -- "---\n:rubygems_api_key: ${RUBY_GEM_API_TOKEN}\n" > $HOME/.gem/credentials
61+
gem build *.gemspec
62+
gem push *.gem
63+
env:
64+
RUBY_GEM_API_TOKEN: "${{secrets.RUBY_GEM_API_TOKEN}}"

0 commit comments

Comments
 (0)