Ruby Gem #11
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: Ruby Gem | |
| on: workflow_dispatch | |
| jobs: | |
| build: | |
| name: Build + Publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
| - name: Set up Ruby 2.6 | |
| uses: ruby/setup-ruby@a0102e0972be65f351c307e2d64b9314a57c8073 # v1.324.0 | |
| with: | |
| ruby-version: 2.6.10 | |
| # This job only runs `gem build` / `gem push`, so it doesn't need Bundler. | |
| # Without this, setup-ruby installs the Gemfile.lock BUNDLED WITH version | |
| # (2.7.1, which needs Ruby >= 3.2), and that fails on Ruby 2.6. | |
| bundler: none | |
| - uses: rubygems/configure-rubygems-credentials@762a4b77c3300434bb57c7ce80b20e36231927aa # v2.0.0 | |
| - name: Build and push gem | |
| run: | | |
| gem build *.gemspec | |
| gem push *.gem | |
| shell: bash |