Skip to content

Commit 5981055

Browse files
committed
chore(ci): allow manual npm publish by tag
1 parent a81fd6a commit 5981055

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Publish to npm
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: Release tag to publish
10+
required: true
11+
default: v0.3.0
612

713
permissions:
814
contents: read
@@ -17,6 +23,8 @@ jobs:
1723
steps:
1824
- name: Checkout repository
1925
uses: actions/checkout@v6
26+
with:
27+
ref: ${{ inputs.tag || github.ref_name }}
2028

2129
- name: Set up Deno
2230
uses: denoland/setup-deno@v2
@@ -32,9 +40,11 @@ jobs:
3240

3341
- name: Verify release tag matches deno.json
3442
shell: bash
43+
env:
44+
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
3545
run: |
3646
VERSION="$(node -p "require('./deno.json').version")"
37-
test "${GITHUB_REF_NAME}" = "v${VERSION}"
47+
test "${RELEASE_TAG}" = "v${VERSION}"
3848
3949
- name: Pack release tarball
4050
run: deno task pack:release

0 commit comments

Comments
 (0)