Skip to content

Commit 71f8e3a

Browse files
committed
Address comments
1 parent 95a1ed4 commit 71f8e3a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,12 @@ jobs:
7070
run: ./scripts/npm-pack.sh
7171

7272
- name: Determine dist-tag
73-
id: dist-tag
73+
id: dist_tag
7474
run: |
7575
TAG=$(node -p "
7676
const v = require('./package.json').version;
7777
const pre = v.split('-')[1];
78-
if (!pre) { 'latest' }
79-
else { pre.split('.')[0].replace(/[0-9]+$/, '') || 'next' }
78+
!pre ? 'latest' : (pre.split('.')[0].replace(/[0-9]+$/, '') || 'next')
8079
")
8180
if [[ -z "$TAG" ]]; then
8281
echo "::error::Failed to determine dist-tag"
@@ -87,7 +86,7 @@ jobs:
8786
8887
- name: Publish
8988
run: |
90-
TAG="${{ steps.dist-tag.outputs.tag }}"
89+
TAG="${{ steps.dist_tag.outputs.tag }}"
9190
if [[ -z "$TAG" ]]; then
9291
echo "::error::dist-tag is empty, aborting publish"
9392
exit 1

0 commit comments

Comments
 (0)