Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.

Commit 37199ab

Browse files
committed
ci: fix publish scripts to use correct tag
1 parent 3ea24f7 commit 37199ab

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
tag:
77
required: true
88
type: string
9+
description: 'Git tag to checkout'
10+
distTag:
11+
required: false
12+
type: string
13+
description: 'NPM dist tag for publishing'
914
nodeVersion:
1015
required: true
1116
type: string
@@ -45,6 +50,6 @@ jobs:
4550
id: distTag
4651

4752
- name: Publish to npm
48-
run: npm publish --access public --tag ${{ steps.distTag.outputs.tag }}
53+
run: npm publish --access public --tag ${{ inputs.distTag || steps.distTag.outputs.tag }}
4954
env:
5055
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/onRelease.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
getDistTag:
1717
outputs:
1818
tag: ${{ steps.distTag.outputs.tag }}
19+
gitTag: ${{ github.event.release.tag_name || inputs.tag }}
1920
runs-on: ubuntu-latest
2021
steps:
2122
- uses: actions/checkout@v4
@@ -29,6 +30,7 @@ jobs:
2930
uses: ./.github/workflows/npm-publish.yml
3031
needs: [getDistTag]
3132
with:
32-
tag: ${{ needs.getDistTag.outputs.tag }}
33+
tag: ${{ needs.getDistTag.outputs.gitTag }}
34+
distTag: ${{ needs.getDistTag.outputs.tag }}
3335
nodeVersion: 'lts/*'
3436
secrets: inherit

0 commit comments

Comments
 (0)