Prepare release v9.1.0 #2
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: Release RubyGems | |
on: | |
push: | |
branches: | |
- release/* | |
jobs: | |
pre-release-check: | |
name: Perform checks before releasing | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
git fetch --quiet origin main | |
git merge-base --is-ancestor HEAD origin/main | |
tests: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
ruby: ["2.7", "3.0", "3.1", "3.2"] | |
include: | |
- os: ubuntu-latest | |
ruby: jruby-9.4 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/test-ruby | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
publish-rubygem: | |
name: Publish Ruby Gem | |
needs: [pre-release-check, tests] | |
runs-on: ubuntu-latest | |
environment: Release | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cucumber/[email protected] | |
with: | |
rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }} | |
create-github-release: | |
name: Create GitHub Release and Git tag | |
needs: publish-rubygem | |
runs-on: ubuntu-latest | |
environment: Release | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cucumber/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |