diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db121b2..8a096bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -199,6 +199,7 @@ jobs: timeout-minutes: 15 permissions: contents: read + id-token: write steps: - name: Resolve tag id: target @@ -223,9 +224,12 @@ jobs: # ubuntu-latest only publishes the latest patch of each series, so 3.1.0 404s. ruby-version: '3.1' + # RubyGems Trusted Publishing: trades the job's OIDC token for a short-lived GEM_HOST_API_KEY. + - name: Configure RubyGems credentials + uses: rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a # v2.1.0 + - name: Build and publish gem env: - GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} VERSION: ${{ steps.target.outputs.version }} run: | gem build getstream-ruby.gemspec