Skip to content

Commit

Permalink
Use OIDC for release
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Aug 22, 2023
1 parent 9bed00a commit dffd969
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,14 @@ jobs:
if: ${{ steps.release.outputs.release_created }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.1
ruby-version: 3.2.2
if: ${{ steps.release.outputs.release_created }}
- uses: rubygems/configure-rubygems-credentials@main
with:
role-to-assume: ${{ secrets.RUBYGEMS_OIDC_ROLE }}
if: ${{ steps.release.outputs.release_created }}
- name: publish gem
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
# Make sure to update the secret name
# if yours isn't named RUBYGEMS_AUTH_TOKEN
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
if: ${{ steps.release.outputs.release_created }}

0 comments on commit dffd969

Please sign in to comment.