File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,6 +131,33 @@ jobs:
131131 working-directory : node_version
132132 run : npm ci
133133
134+ - name : Sync version with tag
135+ working-directory : node_version
136+ run : |
137+ VERSION=${GITHUB_REF#refs/tags/v}
138+ npm version $VERSION --no-git-tag-version
139+
140+ - name : Check if version exists
141+ working-directory : node_version
142+ run : |
143+ PACKAGE_NAME=$(node -p "require('./package.json').name")
144+ VERSION=$(node -p "require('./package.json').version")
145+
146+ if npm view "$PACKAGE_NAME@$VERSION" version >/dev/null 2>&1; then
147+ echo "Version already exists on npm"
148+ exit 1
149+ fi
150+
151+ - name : Build package tarball
152+ wogsrking-directory : node_version
153+ run : npm pack
154+
155+ - name : Verify package contains native binaries
156+ working-directory : node_version
157+ run : |
158+ TAR=$(ls *.tgz)
159+ tar -tf "$TAR" | grep "dist/native" || (echo "Missing native binaries in package" && exit 1)
160+
134161 - name : Package check
135162 working-directory : node_version
136163 run : npm pack --dry-run
You can’t perform that action at this time.
0 commit comments