.github/workflows/release_pipeline.yml
name: Release Pipeline
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
ci:
name: "CI"
uses: ./.github/workflows/ci.yml
secrets: inherit
release:
needs: ci
if: always() && !contains(needs.*.result, 'failed') && !contains(needs.*.result, 'cancelled')
name: Build & Release Gem
runs-on: ubuntu-latest
environment: rubygems
permissions:
contents: write
id-token: write
steps:
# Set up
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
# Release
- name: Publish to RubyGems
uses: rubygems/release-gem@v1