File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 3232 with :
3333 version : ' latest'
3434
35+ - name : Get latest wasm-opt version
36+ id : wasm-opt
37+ uses : pozetroninc/github-action-get-latest-release@master
38+ with :
39+ repository : WebAssembly/binaryen
40+ excludes : prerelease, draft
41+ token : ${{ secrets.GITHUB_TOKEN }}
42+
3543 - name : Build examples
3644 run : cargo run -p build-examples --bin build-examples
45+ env :
46+ LATEST_WASM_OPT_VERSION : ${{ steps.wasm-opt.outputs.release }}
3747
3848 - name : Deploy to Firebase
3949 uses : siku2/action-hosting-deploy@v1
Original file line number Diff line number Diff line change 5959 with :
6060 version : " latest"
6161
62+ - name : Get latest wasm-opt version
63+ id : wasm-opt
64+ uses : pozetroninc/github-action-get-latest-release@master
65+ with :
66+ repository : WebAssembly/binaryen
67+ excludes : prerelease, draft
68+ token : ${{ secrets.GITHUB_TOKEN }}
69+
6270 - name : Build examples
6371 run : cargo run -p build-examples --bin build-examples
72+ env :
73+ LATEST_WASM_OPT_VERSION : ${{ steps.wasm-opt.outputs.release }}
6474
6575 - name : Collect size information
6676 run : python3 ci/collect_sizes.py
Original file line number Diff line number Diff line change 1- use std:: fs;
21use std:: path:: Path ;
2+ use std:: { env, fs} ;
33
44use serde:: Deserialize ;
55use toml:: Table ;
@@ -13,6 +13,16 @@ struct GitHubRelease {
1313}
1414
1515pub fn get_latest_wasm_opt_version ( ) -> String {
16+ if let Ok ( version) = env:: var ( "LATEST_WASM_OPT_VERSION" ) {
17+ if !version. is_empty ( ) {
18+ return version;
19+ }
20+ }
21+
22+ get_latest_wasm_opt_version_from_api ( )
23+ }
24+
25+ fn get_latest_wasm_opt_version_from_api ( ) -> String {
1626 let url = "https://api.github.com/repos/WebAssembly/binaryen/releases/latest" ;
1727 let client = reqwest:: blocking:: Client :: new ( ) ;
1828
You can’t perform that action at this time.
0 commit comments