@qr-platform/qr-code.js 0.8.19 → 0.8.20
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.
- package/.github/workflows/publish.yml +10 -5
- package/CHANGELOG.md +6 -0
- package/lib/qr-code-js-node.js +1 -1
- package/lib/qr-code-js.js +1 -1
- package/package.json +1 -1
@@ -19,20 +19,25 @@ jobs:
|
|
19
19
|
node-version: '22'
|
20
20
|
registry-url: 'https://registry.npmjs.org'
|
21
21
|
|
22
|
-
|
22
|
+
# --- Check if version already exists ---
|
23
|
+
- name: Check if version exists on npm
|
23
24
|
id: check_version
|
24
25
|
run: |
|
26
|
+
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
25
27
|
VERSION=$(node -p "require('./package.json').version")
|
26
|
-
if
|
27
|
-
|
28
|
+
echo "Checking if package '${PACKAGE_NAME}@${VERSION}' exists on npm..."
|
29
|
+
if npm view "${PACKAGE_NAME}@${VERSION}" version > /dev/null 2>&1; then
|
30
|
+
echo "Version ${VERSION} of ${PACKAGE_NAME} already exists on npm. Skipping publish."
|
28
31
|
echo "skip_publish=true" >> $GITHUB_OUTPUT
|
29
32
|
else
|
30
|
-
echo "Version ${VERSION} does not exist
|
33
|
+
echo "Version ${VERSION} of ${PACKAGE_NAME} does not exist on npm. Proceeding with publish."
|
31
34
|
echo "skip_publish=false" >> $GITHUB_OUTPUT
|
32
35
|
fi
|
33
36
|
|
37
|
+
# --- Publish Step ---
|
34
38
|
- name: Publish to npm
|
39
|
+
# Only run this step if check_version determined skip_publish is 'false'
|
35
40
|
if: steps.check_version.outputs.skip_publish == 'false'
|
36
|
-
run: npm publish
|
41
|
+
run: npm publish
|
37
42
|
env:
|
38
43
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|