@@ -56,19 +56,19 @@ jobs:
5656 env :
5757 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5858 steps :
59- - uses : actions/checkout@v4
59+ - uses : actions/checkout@v6
6060 with :
6161 persist-credentials : false
6262 submodules : recursive
6363 - name : Install Rust
64- run : rustup update "1.88.0 " --no-self-update && rustup default "1.88.0 "
64+ run : rustup update "1.91 " --no-self-update && rustup default "1.91 "
6565 - name : Install dist
6666 # we specify bash to get pipefail; it guards against the `curl` command
6767 # failing. otherwise `sh` won't catch that `curl` returned non-0
6868 shell : bash
69- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.3 /cargo-dist-installer.sh | sh"
69+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.31.0 /cargo-dist-installer.sh | sh"
7070 - name : Cache dist
71- uses : actions/upload-artifact@v4
71+ uses : actions/upload-artifact@v6
7272 with :
7373 name : cargo-dist-cache
7474 path : ~/.cargo/bin/dist
8484 cat plan-dist-manifest.json
8585 echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
8686 - name : " Upload dist-manifest.json"
87- uses : actions/upload-artifact@v4
87+ uses : actions/upload-artifact@v6
8888 with :
8989 name : artifacts-plan-dist-manifest
9090 path : plan-dist-manifest.json
@@ -118,7 +118,7 @@ jobs:
118118 - name : enable windows longpaths
119119 run : |
120120 git config --global core.longpaths true
121- - uses : actions/checkout@v4
121+ - uses : actions/checkout@v6
122122 with :
123123 persist-credentials : false
124124 submodules : recursive
@@ -130,12 +130,12 @@ jobs:
130130 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
131131 fi
132132 - name : Use rustup to set correct Rust version
133- run : rustup update "1.88.0 " --no-self-update && rustup default "1.88.0 "
133+ run : rustup update "1.91 " --no-self-update && rustup default "1.91 "
134134 - name : Install dist
135135 run : ${{ matrix.install_dist.run }}
136136 # Get the dist-manifest
137137 - name : Fetch local artifacts
138- uses : actions/download-artifact@v4
138+ uses : actions/download-artifact@v7
139139 with :
140140 pattern : artifacts-*
141141 path : target/distrib/
@@ -162,7 +162,7 @@ jobs:
162162
163163 cp dist-manifest.json "$BUILD_MANIFEST_NAME"
164164 - name : " Upload artifacts"
165- uses : actions/upload-artifact@v4
165+ uses : actions/upload-artifact@v6
166166 with :
167167 name : artifacts-build-local-${{ join(matrix.targets, '_') }}
168168 path : |
@@ -179,21 +179,21 @@ jobs:
179179 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
180180 BUILD_MANIFEST_NAME : target/distrib/global-dist-manifest.json
181181 steps :
182- - uses : actions/checkout@v4
182+ - uses : actions/checkout@v6
183183 with :
184184 persist-credentials : false
185185 submodules : recursive
186186 - name : Install Rust
187- run : rustup update "1.88.0 " --no-self-update && rustup default "1.88.0 "
187+ run : rustup update "1.91 " --no-self-update && rustup default "1.91 "
188188 - name : Install cached dist
189- uses : actions/download-artifact@v4
189+ uses : actions/download-artifact@v7
190190 with :
191191 name : cargo-dist-cache
192192 path : ~/.cargo/bin/
193193 - run : chmod +x ~/.cargo/bin/dist
194194 # Get all the local artifacts for the global tasks to use (for e.g. checksums)
195195 - name : Fetch local artifacts
196- uses : actions/download-artifact@v4
196+ uses : actions/download-artifact@v7
197197 with :
198198 pattern : artifacts-*
199199 path : target/distrib/
@@ -211,7 +211,7 @@ jobs:
211211
212212 cp dist-manifest.json "$BUILD_MANIFEST_NAME"
213213 - name : " Upload artifacts"
214- uses : actions/upload-artifact@v4
214+ uses : actions/upload-artifact@v6
215215 with :
216216 name : artifacts-build-global
217217 path : |
@@ -231,21 +231,21 @@ jobs:
231231 outputs :
232232 val : ${{ steps.host.outputs.manifest }}
233233 steps :
234- - uses : actions/checkout@v4
234+ - uses : actions/checkout@v6
235235 with :
236236 persist-credentials : false
237237 submodules : recursive
238238 - name : Install Rust
239- run : rustup update "1.88.0 " --no-self-update && rustup default "1.88.0 "
239+ run : rustup update "1.91 " --no-self-update && rustup default "1.91 "
240240 - name : Install cached dist
241- uses : actions/download-artifact@v4
241+ uses : actions/download-artifact@v7
242242 with :
243243 name : cargo-dist-cache
244244 path : ~/.cargo/bin/
245245 - run : chmod +x ~/.cargo/bin/dist
246246 # Fetch artifacts from scratch-storage
247247 - name : Fetch artifacts
248- uses : actions/download-artifact@v4
248+ uses : actions/download-artifact@v7
249249 with :
250250 pattern : artifacts-*
251251 path : target/distrib/
@@ -258,14 +258,14 @@ jobs:
258258 cat dist-manifest.json
259259 echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
260260 - name : " Upload dist-manifest.json"
261- uses : actions/upload-artifact@v4
261+ uses : actions/upload-artifact@v6
262262 with :
263263 # Overwrite the previous copy
264264 name : artifacts-dist-manifest
265265 path : dist-manifest.json
266266 # Create a GitHub Release while uploading all files to it
267267 - name : " Download GitHub Artifacts"
268- uses : actions/download-artifact@v4
268+ uses : actions/download-artifact@v7
269269 with :
270270 pattern : artifacts-*
271271 path : artifacts
@@ -298,14 +298,14 @@ jobs:
298298 GITHUB_EMAIL : " admin+bot@axo.dev"
299299 if : ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
300300 steps :
301- - uses : actions/checkout@v4
301+ - uses : actions/checkout@v6
302302 with :
303303 persist-credentials : true
304304 repository : " txpipe/homebrew-tap"
305305 token : ${{ secrets.HOMEBREW_TAP_TOKEN }}
306306 # So we have access to the formula
307307 - name : Fetch homebrew formulae
308- uses : actions/download-artifact@v4
308+ uses : actions/download-artifact@v7
309309 with :
310310 pattern : artifacts-*
311311 path : Formula/
@@ -332,20 +332,49 @@ jobs:
332332 done
333333 git push
334334
335+ publish-npm :
336+ needs :
337+ - plan
338+ - host
339+ runs-on : " ubuntu-22.04"
340+ env :
341+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
342+ PLAN : ${{ needs.plan.outputs.val }}
343+ if : ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
344+ steps :
345+ - name : Fetch npm packages
346+ uses : actions/download-artifact@v7
347+ with :
348+ pattern : artifacts-*
349+ path : npm/
350+ merge-multiple : true
351+ - uses : actions/setup-node@v6
352+ with :
353+ node-version : ' 20.x'
354+ registry-url : ' https://registry.npmjs.org'
355+ - run : |
356+ for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith("-npm-package.tar.gz")] | any)'); do
357+ pkg=$(echo "$release" | jq '.artifacts[] | select(endswith("-npm-package.tar.gz"))' --raw-output)
358+ npm publish --access public "./npm/${pkg}"
359+ done
360+ env:
361+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
362+
335363 announce :
336364 needs :
337365 - plan
338366 - host
339367 - publish-homebrew-formula
368+ - publish-npm
340369 # use "always() && ..." to allow us to wait for all publish jobs while
341370 # still allowing individual publish jobs to skip themselves (for prereleases).
342371 # "host" however must run to completion, no skipping allowed!
343- if : ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') }}
372+ if : ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') && (needs.publish-npm.result == 'skipped' || needs.publish-npm.result == 'success') }}
344373 runs-on : " ubuntu-22.04"
345374 env :
346375 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
347376 steps :
348- - uses : actions/checkout@v4
377+ - uses : actions/checkout@v6
349378 with :
350379 persist-credentials : false
351380 submodules : recursive
0 commit comments