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 f770316 commit e447cdeCopy full SHA for e447cde
.github/workflows/publish.yml
@@ -25,6 +25,17 @@ jobs:
25
- name: Run build
26
run: npm run build
27
28
+ - name: Check if version already exists on npm
29
+ id: check
30
+ run: |
31
+ VERSION=$(node -p "require('./package.json').version")
32
+ NAME=$(node -p "require('./package.json').name")
33
+ if npm view $NAME@$VERSION > /dev/null 2>&1; then
34
+ echo "exists=true" >> $GITHUB_OUTPUT
35
+ else
36
+ echo "exists=false" >> $GITHUB_OUTPUT
37
+ fi
38
+
39
- name: Publish to npm
40
run: npm publish --access public
41
env:
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "directus-helper",
3
- "version": "1.0.0",
+ "version": "1.0.1",
4
"license": "MIT",
5
"bin": "dist/cli.js",
6
"type": "module",
0 commit comments