v0.349.0 #194
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Gems - Release to RubyGems | |
| on: # yamllint disable-line rule:truthy | |
| release: | |
| # It's fine to trigger on every release because if we tag a release w/o | |
| # bumping the Gem version, RubyGems will reject it with an error that the | |
| # version is already live. | |
| types: [published] | |
| jobs: | |
| release-gems: | |
| name: Release gems to rubygems.org | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0 | |
| with: | |
| bundler-cache: true | |
| - name: Install the RubyGems version specified in the Dockerfile.updater-core file | |
| run: | | |
| RUBYGEMS_VERSION=$(grep 'ARG RUBYGEMS_VERSION=' Dockerfile.updater-core | cut -d '=' -f 2) | |
| gem update --system $RUBYGEMS_VERSION | |
| - name: Install sorbet-runtime for typed code support | |
| run: | | |
| SORBET_RUNTIME_VERSION=$(grep 'sorbet-runtime (' Gemfile.lock | grep -v '~>' | grep -v '=' | head -n 1 | sed 's/.*(\(.*\))/\1/') | |
| gem install sorbet-runtime -v $SORBET_RUNTIME_VERSION | |
| - uses: rubygems/configure-rubygems-credentials@bc6dd217f8a4f919d6835fcfefd470ef821f5c44 # v1.0.0 | |
| # We can't use the https://github.com/rubygems/release-gem workflow because it calls `rake release` rather than `rake gems:release`. | |
| # `rake release` causes problems because it tries to push a git tag, but we've already manually tagged the release as part of the `gems-bump-version` workflow. | |
| - run: gem exec rake gems:release |