Skip to content

Commit efc3085

Browse files
authored
Merge pull request #2703 from ViewComponent/joelhawksley-redesigned-sniffle
Dispatch push_gem against the tag ref, not main
2 parents d1fd891 + 2845005 commit efc3085

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎.github/workflows/push_gem.yml‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ on:
55
tags:
66
- v*
77
workflow_dispatch:
8-
inputs:
9-
tag:
10-
description: 'Tag to push to RubyGems (e.g. v4.14.0)'
11-
required: true
12-
type: string
138

149
permissions:
1510
contents: read
@@ -35,7 +30,6 @@ jobs:
3530

3631
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
3732
with:
38-
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
3933
persist-credentials: false
4034
- name: Set up Ruby
4135
uses: ruby/setup-ruby@v1

‎script/publish‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ gh release create "$tag" \
7777
# the tag push above will not fire push_gem.yml on its own when this
7878
# script runs inside the publish-release workflow. Dispatch it here so
7979
# 'script/publish' always results in a gem being pushed to RubyGems.
80+
#
81+
# Dispatch against the tag ref (not main) because the 'release'
82+
# environment restricts deployments to v* tags.
8083
gh workflow run push_gem.yml \
8184
--repo ViewComponent/view_component \
82-
--ref main \
83-
--field tag="$tag" || true
85+
--ref "$tag" || true

0 commit comments

Comments
 (0)