Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/push_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
tags:
- v*
workflow_dispatch:
inputs:
tag:
description: 'Tag to push to RubyGems (e.g. v4.14.0)'
required: true
type: string

permissions:
contents: read
Expand All @@ -29,6 +35,7 @@ jobs:

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
10 changes: 10 additions & 0 deletions script/publish
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,13 @@ gh release create "$tag" \
--title "$version" \
--notes "$changelog" \
--repo ViewComponent/view_component

# Kick off the Push Gem workflow explicitly. GitHub Actions does not
# trigger downstream workflows for events driven by GITHUB_TOKEN — so
# the tag push above will not fire push_gem.yml on its own when this
# script runs inside the publish-release workflow. Dispatch it here so
# 'script/publish' always results in a gem being pushed to RubyGems.
gh workflow run push_gem.yml \
--repo ViewComponent/view_component \
--ref main \
--field tag="$tag" || true
Loading