@@ -74,14 +74,14 @@ jobs:
7474 run : |-
7575 git config --global core.autocrlf false
7676 git config --global core.eol lf
77- - uses : actions/checkout@v6
78- - uses : dsherret/rust-toolchain-file@v1
77+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
78+ - uses : dsherret/rust-toolchain-file@3551321aa44dd44a0393eb3b6bdfbc5d25ecf621 # v1
7979 - name : Cache cargo
80- uses : Swatinem/rust-cache@v2
80+ uses : Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
8181 if : ' !startsWith(github.ref, '' refs/tags/'' )'
8282 with :
8383 key : ' ${{ matrix.config.target }}'
84- - uses : denoland/setup-deno@v2
84+ - uses : denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2
8585 - name : Setup (Linux x86_64-musl)
8686 if : matrix.config.target == 'x86_64-unknown-linux-musl'
8787 run : |-
@@ -125,8 +125,8 @@ jobs:
125125 - name : Lint workflow generation
126126 if : ' !startsWith(github.ref, '' refs/tags/'' ) && matrix.config.target == '' x86_64-unknown-linux-gnu'' '
127127 run : |-
128- deno run -A .github/workflows/ci.ts --lint
129- deno run -A .github/workflows/release.ts --lint
128+ ./ .github/workflows/ci.ts --lint
129+ ./ .github/workflows/release.ts --lint
130130 - name : Test (Debug)
131131 if : ' matrix.config.run_tests == '' true'' && !startsWith(github.ref, '' refs/tags/'' )'
132132 run : cargo test --locked --all-features
@@ -196,55 +196,55 @@ jobs:
196196 zip -r dprint-plugin-exec-loongarch64-unknown-linux-gnu.zip dprint-plugin-exec
197197 echo "::set-output name=ZIP_CHECKSUM::$(shasum -a 256 dprint-plugin-exec-loongarch64-unknown-linux-gnu.zip | awk '{print $1}')"
198198 - name : Upload artifacts (x86_64-apple-darwin)
199- uses : actions/upload-artifact@v4
199+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
200200 if : ' matrix.config.target == '' x86_64-apple-darwin'' && startsWith(github.ref, '' refs/tags/'' )'
201201 with :
202202 name : x86_64-apple-darwin-artifacts
203203 path : target/x86_64-apple-darwin/release/dprint-plugin-exec-x86_64-apple-darwin.zip
204204 - name : Upload artifacts (aarch64-apple-darwin)
205- uses : actions/upload-artifact@v4
205+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
206206 if : ' matrix.config.target == '' aarch64-apple-darwin'' && startsWith(github.ref, '' refs/tags/'' )'
207207 with :
208208 name : aarch64-apple-darwin-artifacts
209209 path : target/aarch64-apple-darwin/release/dprint-plugin-exec-aarch64-apple-darwin.zip
210210 - name : Upload artifacts (x86_64-pc-windows-msvc)
211- uses : actions/upload-artifact@v4
211+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
212212 if : ' matrix.config.target == '' x86_64-pc-windows-msvc'' && startsWith(github.ref, '' refs/tags/'' )'
213213 with :
214214 name : x86_64-pc-windows-msvc-artifacts
215215 path : target/x86_64-pc-windows-msvc/release/dprint-plugin-exec-x86_64-pc-windows-msvc.zip
216216 - name : Upload artifacts (x86_64-unknown-linux-gnu)
217- uses : actions/upload-artifact@v4
217+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
218218 if : ' matrix.config.target == '' x86_64-unknown-linux-gnu'' && startsWith(github.ref, '' refs/tags/'' )'
219219 with :
220220 name : x86_64-unknown-linux-gnu-artifacts
221221 path : target/x86_64-unknown-linux-gnu/release/dprint-plugin-exec-x86_64-unknown-linux-gnu.zip
222222 - name : Upload artifacts (x86_64-unknown-linux-musl)
223- uses : actions/upload-artifact@v4
223+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
224224 if : ' matrix.config.target == '' x86_64-unknown-linux-musl'' && startsWith(github.ref, '' refs/tags/'' )'
225225 with :
226226 name : x86_64-unknown-linux-musl-artifacts
227227 path : target/x86_64-unknown-linux-musl/release/dprint-plugin-exec-x86_64-unknown-linux-musl.zip
228228 - name : Upload artifacts (aarch64-unknown-linux-gnu)
229- uses : actions/upload-artifact@v4
229+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
230230 if : ' matrix.config.target == '' aarch64-unknown-linux-gnu'' && startsWith(github.ref, '' refs/tags/'' )'
231231 with :
232232 name : aarch64-unknown-linux-gnu-artifacts
233233 path : target/aarch64-unknown-linux-gnu/release/dprint-plugin-exec-aarch64-unknown-linux-gnu.zip
234234 - name : Upload artifacts (aarch64-unknown-linux-musl)
235- uses : actions/upload-artifact@v4
235+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
236236 if : ' matrix.config.target == '' aarch64-unknown-linux-musl'' && startsWith(github.ref, '' refs/tags/'' )'
237237 with :
238238 name : aarch64-unknown-linux-musl-artifacts
239239 path : target/aarch64-unknown-linux-musl/release/dprint-plugin-exec-aarch64-unknown-linux-musl.zip
240240 - name : Upload artifacts (riscv64gc-unknown-linux-gnu)
241- uses : actions/upload-artifact@v4
241+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
242242 if : ' matrix.config.target == '' riscv64gc-unknown-linux-gnu'' && startsWith(github.ref, '' refs/tags/'' )'
243243 with :
244244 name : riscv64gc-unknown-linux-gnu-artifacts
245245 path : target/riscv64gc-unknown-linux-gnu/release/dprint-plugin-exec-riscv64gc-unknown-linux-gnu.zip
246246 - name : Upload artifacts (loongarch64-unknown-linux-gnu)
247- uses : actions/upload-artifact@v4
247+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
248248 if : ' matrix.config.target == '' loongarch64-unknown-linux-gnu'' && startsWith(github.ref, '' refs/tags/'' )'
249249 with :
250250 name : loongarch64-unknown-linux-gnu-artifacts
@@ -255,12 +255,19 @@ jobs:
255255 - build
256256 if : ' startsWith(github.ref, '' refs/tags/'' )'
257257 runs-on : ubuntu-latest
258+ permissions :
259+ contents : write
260+ id-token : write
258261 steps :
259262 - name : Checkout
260- uses : actions/checkout@v4
263+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
261264 - name : Download artifacts
262- uses : actions/download-artifact@v4
263- - uses : denoland/setup-deno@v2
265+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
266+ - uses : denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2
267+ - uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
268+ with :
269+ node-version : 24.x
270+ registry-url : ' https://registry.npmjs.org'
264271 - name : Move downloaded artifacts to root directory
265272 run : |-
266273 mv x86_64-apple-darwin-artifacts/dprint-plugin-exec-x86_64-apple-darwin.zip .
@@ -293,10 +300,12 @@ jobs:
293300 run : ' echo "::set-output name=CHECKSUM::$(shasum -a 256 plugin.json | awk '' {print $1}'' )"'
294301 - name : Update Config Schema Version
295302 run : ' sed -i '' s/exec\/0.0.0/exec\/${{ steps.get_tag_version.outputs.TAG_VERSION }}/'' deployment/schema.json'
303+ - name : Build npm packages
304+ run : deno run -A scripts/create_npm_packages.ts
296305 - name : Create release notes
297306 run : ' deno run -A ./scripts/generate_release_notes.ts ${{ steps.get_tag_version.outputs.TAG_VERSION }} ${{ steps.get_plugin_file_checksum.outputs.CHECKSUM }} > ${{ github.workspace }}-CHANGELOG.txt'
298307 - name : Release
299- uses : softprops/action-gh-release@v2.6.1
308+ uses : softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
300309 env :
301310 GITHUB_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
302311 with :
@@ -313,3 +322,5 @@ jobs:
313322 plugin.json
314323 deployment/schema.json
315324 body_path : ' ${{ github.workspace }}-CHANGELOG.txt'
325+ - name : Publish npm packages
326+ run : deno run -A scripts/publish_npm_packages.ts
0 commit comments