Skip to content
Closed
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
6 changes: 6 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: 'Version to publish (e.g., v0.1.1). Must already exist as a GitHub Release.'
required: true
type: string
release_sha:
description: 'Release commit SHA to publish from. Defaults to the version tag for manual runs.'
required: false
type: string
workflow_run:
workflows: ['Release']
types: [completed]
Expand Down Expand Up @@ -40,6 +44,8 @@ jobs:
steps:
- uses: actions/checkout@v4
if: github.event_name == 'workflow_dispatch'
with:
ref: ${{ inputs.release_sha || inputs.version }}
Comment on lines +47 to +48
Comment on lines +47 to +48

- uses: actions/checkout@v4
if: github.event_name == 'workflow_run'
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ jobs:
run: |
gh workflow run npm-publish.yml \
--repo "${{ github.repository }}" \
--ref main \
-f version="${{ inputs.version }}"
--ref "${{ inputs.version }}" \
-f version="${{ inputs.version }}" \
-f release_sha="${{ github.sha }}"
echo "Dispatched npm-publish.yml for ${{ inputs.version }}."