This repository was archived by the owner on Jun 1, 2026. It is now read-only.
Bump fac/ruby-gem-push-action from 81d77bf568ff6659d7fae0f0c5a036bb0aeacb1a to ec8d814ef3539180663d51a63bedc75fe2b61a58 #24
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: FreeAgent Gem | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| # Install the bundle and run the gems test suite. | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
| - uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0 | |
| with: | |
| bundler-cache: true # bundle install and cache | |
| - name: Test | |
| env: | |
| GITHUB_PAT: ${{ secrets.github_token }} | |
| run: bundle exec rake | |
| # Builds on the main branch, that pass testing above, will trigger a push of a | |
| # new gem version. If the version.rb has not been bumped since the last | |
| # release, this will be a no-op, other wise the new version will be added to | |
| # the registry: https://github.com/orgs/fac/packages?ecosystem=rubygems | |
| release: | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: fac/ruby-gem-setup-credentials-action@5f62d5f2f56a11c7422a92f81fbb29af01e1c00f # v2 | |
| with: | |
| token: ${{ secrets.github_token }} | |
| # Build the gem package | |
| - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
| - uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0 | |
| with: | |
| bundler-cache: true | |
| - run: bundle exec rake build | |
| # Release production gem version from default branch | |
| - name: Release | |
| if: github.ref == 'refs/heads/main' | |
| uses: fac/ruby-gem-push-action@ec8d814ef3539180663d51a63bedc75fe2b61a58 # v2 | |
| with: | |
| key: github | |
| # PR branch builds will release pre-release gems | |
| - name: Pre-Release | |
| if: github.ref != 'refs/heads/main' | |
| uses: fac/ruby-gem-push-action@ec8d814ef3539180663d51a63bedc75fe2b61a58 # v2 | |
| with: | |
| key: github | |
| pre-release: true |