We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b30fe9 commit 4d94f0eCopy full SHA for 4d94f0e
1 file changed
.github/workflows/release.yml
@@ -113,7 +113,19 @@ jobs:
113
node-version: "20"
114
registry-url: "https://registry.npmjs.org"
115
116
+ - name: Determine npm tag
117
+ id: npm-tag
118
+ run: |
119
+ TAG_NAME="${GITHUB_REF#refs/tags/}"
120
+ if echo "$TAG_NAME" | grep -qE 'beta|rc|alpha'; then
121
+ echo "tag=beta" >> "$GITHUB_OUTPUT"
122
+ else
123
+ echo "tag=latest" >> "$GITHUB_OUTPUT"
124
+ fi
125
+ env:
126
+ GITHUB_REF: ${{ github.ref }}
127
+
128
- name: Publish to npm
- run: npm publish --access public
129
+ run: npm publish --access public --tag ${{ steps.npm-tag.outputs.tag }}
130
env:
131
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments