@unlimiting/unlimitgen 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,5 +44,25 @@ jobs:
44
44
  echo "package: $PKG_NAME"
45
45
  test "$PKG_NAME" = "@unlimiting/unlimitgen"
46
46
 
47
+ - name: Check if version already exists on npm
48
+ id: check_version
49
+ run: |
50
+ PKG_NAME=$(node -p "require('./package.json').name")
51
+ PKG_VERSION=$(node -p "require('./package.json').version")
52
+ echo "package=$PKG_NAME version=$PKG_VERSION"
53
+ if npm view "${PKG_NAME}@${PKG_VERSION}" version >/dev/null 2>&1; then
54
+ echo "already_published=true" >> "$GITHUB_OUTPUT"
55
+ echo "skip publish: version already exists"
56
+ else
57
+ echo "already_published=false" >> "$GITHUB_OUTPUT"
58
+ fi
59
+
47
60
  - name: Publish (Trusted Publishing + Provenance)
61
+ if: steps.check_version.outputs.already_published == 'false'
62
+ env:
63
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48
64
  run: npm publish --access public --provenance
65
+
66
+ - name: Skip message
67
+ if: steps.check_version.outputs.already_published == 'true'
68
+ run: echo "Publish skipped because the same version is already on npm."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unlimiting/unlimitgen",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Unified CLI for image/video generation via Gemini/OpenAI/Grok",
5
5
  "main": "index.js",
6
6
  "scripts": {