Update release mechanism to use RubyGem Trusted OIDC flow #32
Workflow file for this run
This file contains 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: [master] | |
pull_request: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Test | |
run: bundle exec rake | |
release: | |
needs: tests | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- uses: rubygems/release-gem@v1 |