@@ -147,7 +147,11 @@ jobs:
147147 - name : wasm npm pack
148148 if : matrix.name == 'wasm'
149149 run : |
150- git clone https://github.com/sqlite/sqlite-wasm.git sqlite-wasm
150+ TAG=$(git ls-remote --tags https://github.com/sqlite/sqlite-wasm.git | \
151+ awk -v ver=$(make sqlite_version) -F'/' '$NF ~ ver"-build[0-9]+$" {print $NF}' | \
152+ sort -V | \
153+ tail -n1)
154+ git clone --branch "$TAG" --depth 1 https://github.com/sqlite/sqlite-wasm.git sqlite-wasm
151155 rm -rf sqlite-wasm/sqlite-wasm/*
152156 unzip dist/sqlite-wasm.zip -d sqlite-wasm/tmp
153157 mv sqlite-wasm/tmp/sqlite-wasm-*/jswasm sqlite-wasm/sqlite-wasm
@@ -207,7 +211,7 @@ jobs:
207211 runs-on : ubuntu-latest
208212 name : release
209213 needs : build
210- if : github.ref == 'refs/heads/main'
214+ # if: github.ref == 'refs/heads/main'
211215
212216 env :
213217 GH_TOKEN : ${{ github.token }}
@@ -221,12 +225,15 @@ jobs:
221225 path : artifacts
222226
223227 - name : setup GitHub Pages
228+ if : false
224229 uses : actions/configure-pages@v5
225230
226231 - name : deploy coverage to GitHub Pages
232+ if : false
227233228234
229235 - name : release tag version from cloudsync.h
236+ if : false
230237 id : tag
231238 run : |
232239 VERSION=$(make version)
@@ -241,6 +248,11 @@ jobs:
241248 fi
242249 echo "❌ CLOUDSYNC_VERSION not found in cloudsync.h"
243250 exit 1
251+
252+ - name : publish sqlite-wasm to npm
253+ run : ls -lah artifacts # npm publish ./artifacts/your-package-1.0.0.tgz
254+ env :
255+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
244256
245257 - name : zip artifacts
246258 run : |
0 commit comments