Skip to content
Merged
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
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Publish npm release
on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: Stable version tag to publish from the selected workflow ref
required: true
type: string

permissions:
contents: read
Expand All @@ -13,12 +19,12 @@ concurrency:

jobs:
verify:
if: github.event.release.prerelease == false
if: github.event_name == 'workflow_dispatch' || github.event.release.prerelease == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.release.tag_name }}
ref: ${{ github.event.release.tag_name || github.sha }}
- uses: pnpm/action-setup@v6
with:
version: 11.6.0
Expand All @@ -28,7 +34,7 @@ jobs:
cache: pnpm
- name: Validate stable release version
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
RELEASE_TAG: ${{ inputs.release_tag || github.event.release.tag_name }}
run: |
node --input-type=module <<'NODE'
import assert from 'node:assert/strict';
Expand Down Expand Up @@ -75,4 +81,4 @@ jobs:
set -- artifacts/*.tgz
[ "$#" -eq 1 ]
[ -f "$1" ]
npm publish "$1" --ignore-scripts --access public --provenance --tag latest
npm publish "$PWD/$1" --ignore-scripts --access public --provenance --tag latest
Loading