Publish #1
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: | |
| workflow_call: | |
| workflow_dispatch: | |
| jobs: | |
| linting: | |
| name: Publish to Rubygems | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.0" | |
| bundler-cache: true | |
| - name: Set credentials | |
| env: | |
| RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | |
| run: | | |
| mkdir ~/.gem | |
| touch ~/.gem/credentials | |
| echo -e "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials | |
| chmod 600 ~/.gem/credentials | |
| - name: Build the Gem | |
| run: | | |
| gem build --strict --output mindee.gem | |
| - name: Publish the Gem | |
| run: | | |
| gem push mindee.gem |