Add Release Guide #3
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 RubyGem | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' # triggers on version tags like v1.2.3 | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 # checkout the repository | |
| - uses: ruby/setup-ruby@v1 # set up Ruby environment | |
| with: | |
| ruby-version: '3.2.8' # specify exact Ruby version | |
| bundler-cache: true # enable bundler caching | |
| - name: Build gem # build the gem package | |
| run: gem build api_solvecaptcha.gemspec | |
| - name: Set up RubyGems credentials # create ~/.gem/credentials with API key | |
| run: | | |
| mkdir -p ~/.gem | |
| echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials | |
| chmod 0600 ~/.gem/credentials | |
| - name: Publish to RubyGems # push the gem to RubyGems.org | |
| env: | |
| RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | |
| run: gem push *.gem |