We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95a1ed4 commit 71f8e3aCopy full SHA for 71f8e3a
1 file changed
.github/workflows/npm-publish.yml
@@ -70,13 +70,12 @@ jobs:
70
run: ./scripts/npm-pack.sh
71
72
- name: Determine dist-tag
73
- id: dist-tag
+ id: dist_tag
74
run: |
75
TAG=$(node -p "
76
const v = require('./package.json').version;
77
const pre = v.split('-')[1];
78
- if (!pre) { 'latest' }
79
- else { pre.split('.')[0].replace(/[0-9]+$/, '') || 'next' }
+ !pre ? 'latest' : (pre.split('.')[0].replace(/[0-9]+$/, '') || 'next')
80
")
81
if [[ -z "$TAG" ]]; then
82
echo "::error::Failed to determine dist-tag"
@@ -87,7 +86,7 @@ jobs:
87
86
88
- name: Publish
89
90
- TAG="${{ steps.dist-tag.outputs.tag }}"
+ TAG="${{ steps.dist_tag.outputs.tag }}"
91
92
echo "::error::dist-tag is empty, aborting publish"
93
exit 1
0 commit comments