33 release :
44 types : [published]
55
6+ permissions :
7+ contents : read
8+
69jobs :
710 publish :
811 name : Publish crates
@@ -19,15 +22,17 @@ jobs:
1922 target=$(rustc -vV | awk '/^host/ { print $2 }' | tr [:lower:] [:upper:] | tr '-' '_')
2023 echo "CARGO_TARGET_${target}_RUSTFLAGS=$W_FLAGS" >> $GITHUB_ENV
2124 - name : Checkout repository
22- uses : actions/checkout@v6
25+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2326
2427 - name : Install Rust toolchain
25- uses : dtolnay/rust-toolchain@stable
28+ uses : dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
2629 with :
2730 toolchain : stable
2831
2932 - name : Install cargo-workspaces
30- run : cargo install cargo-workspaces
33+ uses : baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 # v3.4.0
34+ with :
35+ crate : cargo-workspaces
3136
3237 - name : Release
3338 env :
@@ -49,24 +54,24 @@ jobs:
4954 timeout-minutes : 60
5055 steps :
5156 - name : Checkout repository
52- uses : actions/checkout@v6
57+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5358
5459 - name : Install Rust toolchain
55- uses : dtolnay/rust-toolchain@stable
60+ uses : dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
5661 with :
5762 toolchain : stable
5863 targets : wasm32-unknown-unknown
5964
6065 - name : Install wasm-pack
61- uses : baptiste0928/cargo-install@v3.4.0
66+ uses : baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 # v3.4.0
6267 with :
6368 crate : wasm-pack
6469
6570 - name : Build boa_wasm
6671 run : wasm-pack build --scope boa-dev ./ffi/wasm
6772
6873 - name : Set-up Node.js
69- uses : actions/setup-node@v6
74+ uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
7075 with :
7176 node-version : " 20"
7277
8893
8994 release-binaries :
9095 name : Publish binaries
96+ permissions :
97+ contents : write
9198 needs : publish
9299 strategy :
93100 fail-fast : false
@@ -107,30 +114,25 @@ jobs:
107114 target : x86_64-pc-windows-msvc
108115 binary_extension : " .exe"
109116 runs-on : ${{ matrix.os }}
117+ timeout-minutes : 60
110118 steps :
111119 - name : Checkout repository
112- uses : actions/checkout@v6
120+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
113121
114122 - name : Install Rust toolchain
115- uses : dtolnay/rust-toolchain@stable
123+ uses : dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
116124 with :
117125 toolchain : stable
118126 targets : ${{ matrix.target }}
119127
120- - name : Cache cargo
121- uses : actions/cache@v5
122- with :
123- path : |
124- target
125- ~/.cargo/git
126- ~/.cargo/registry
127- key : ${{ matrix.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
128+ - name : Cache Cargo
129+ uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
128130
129131 - name : Build
130132 run : cargo build --target ${{ matrix.target }} --verbose --release --locked --bin boa
131133
132134 - name : Upload binaries to release
133- uses : svenstaro/upload-release-action@v2
135+ uses : svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2
134136 with :
135137 repo_token : ${{ secrets.GITHUB_TOKEN }}
136138 file : target/${{ matrix.target }}/release/boa${{ matrix.binary_extension }}
0 commit comments