Skip to content

Commit fdbf60a

Browse files
fix: npm package name checks (#525)
`npm view` was checking the wrong package names – we need e.g. `@postgrestools/cli-aarch64-apple-darwin` <img width="587" height="43" alt="Screenshot 2025-09-19 at 09 37 56" src="https://github.com/user-attachments/assets/b51d0ff7-48ca-460f-acbc-bd0f8a7a1b7f" />
1 parent f23541f commit fdbf60a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/publish.reusable.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,12 @@ jobs:
4747
if: inputs.is-prerelease != 'true'
4848
run: |
4949
for package in packages/@postgrestools/*; do
50-
package_basename=$(basename "$package")
51-
package_name="@postgrestools/$package_basename"
52-
package_version="${{ inputs.release-tag }}"
50+
version="${{ inputs.release-tag }}"
5351
54-
if npm view "$package_name@$package_version" version 2>/dev/null; then
55-
echo "Package $package_name@$package_version already exists, skipping..."
52+
if npm view "$package@$version" version 2>/dev/null; then
53+
echo "Package $package@$version already exists, skipping..."
5654
else
57-
echo "Publishing $package_name@$package_version..."
55+
echo "Publishing $package@$version..."
5856
npm publish "$package" --tag latest --access public --provenance
5957
fi
6058
done

0 commit comments

Comments
 (0)