fix: remove rubygems_mfa_required to allow CI publish #2
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: publish | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Version tag to publish (e.g. v1.0.0)' | |
| required: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| publish: | |
| name: Publish to RubyGems | |
| runs-on: ubuntu-latest | |
| environment: rubygems | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 | |
| with: | |
| ruby-version: .ruby-version | |
| bundler-cache: true | |
| - name: Build gem | |
| run: gem build arcp.gemspec | |
| - name: Publish to RubyGems | |
| env: | |
| GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | |
| run: | | |
| mkdir -p ~/.gem | |
| printf -- "---\n:rubygems_api_key: %s\n" "$GEM_HOST_API_KEY" > ~/.gem/credentials | |
| chmod 0600 ~/.gem/credentials | |
| gem push arcp-*.gem | |
| rm -f ~/.gem/credentials |