We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 115b6f1 commit a03516bCopy full SHA for a03516b
1 file changed
.github/workflows/publish.yml
@@ -82,5 +82,19 @@ jobs:
82
package-manager-cache: false
83
registry-url: https://registry.npmjs.org
84
85
+ - name: Resolve npm dist-tag
86
+ run: |
87
+ RELEASE_VERSION=${GITHUB_REF#refs/*/}
88
+ PACKAGE_VERSION=${RELEASE_VERSION#v}
89
+
90
+ case "$PACKAGE_VERSION" in
91
+ *-alpha.*) NPM_TAG=alpha ;;
92
+ *-beta.*) NPM_TAG=beta ;;
93
+ *-rc.*) NPM_TAG=rc ;;
94
+ *) NPM_TAG=latest ;;
95
+ esac
96
97
+ echo "NPM_TAG=$NPM_TAG" >> "$GITHUB_ENV"
98
99
- name: Publish new version
- run: npm publish ./*.tgz --access public --tag=latest
100
+ run: npm publish ./*.tgz --access public --tag="$NPM_TAG"
0 commit comments