Skip to content

Commit 752dbd6

Browse files
committed
Reintroduce publish CI job (#3308)
* Reintroduce publish CI job * Deny warnings on publish
1 parent 987ddd2 commit 752dbd6

File tree

1 file changed

+37
-17
lines changed

1 file changed

+37
-17
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ on:
55

66
jobs:
77
publish:
8-
name: publish
8+
name: Publish crates
99
runs-on: ubuntu-latest
1010
timeout-minutes: 60
11+
env:
12+
RUSTFLAGS: -D warnings
1113
steps:
1214
- name: Checkout repository
1315
uses: actions/checkout@v3
@@ -36,21 +38,28 @@ jobs:
3638
--from-git \
3739
--yes \
3840
--no-git-commit \
39-
--no-git-push \
40-
--no-individual-tags \
4141
skip
4242
4343
doc-publish:
44-
# needs: publish
44+
name: Publish documentation
45+
needs: publish
4546
runs-on: ubuntu-latest
4647
timeout-minutes: 60
4748
steps:
48-
- uses: actions/checkout@v3
49+
- uses: actions/checkout@v4
50+
- name: Install Rust toolchain
51+
uses: actions-rs/toolchain@v1
52+
with:
53+
toolchain: stable
54+
profile: minimal
55+
override: true
4956
- name: Install wasm-pack
50-
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
57+
uses: baptiste0928/[email protected]
58+
with:
59+
crate: wasm-pack
5160
- uses: actions/setup-node@v3
5261
with:
53-
node-version: "16"
62+
node-version: "20"
5463
- run: npm ci
5564
- name: Cache npm build
5665
uses: actions/cache@v3
@@ -62,6 +71,7 @@ jobs:
6271
~/.cargo/git
6372
~/.cargo/registry
6473
key: ${{ runner.os }}-npm-build-target-${{ hashFiles('**/package-lock.json') }}
74+
- run: wasm-pack build ./boa_wasm
6575
- run: npm run build:prod
6676
- name: Deploy
6777
uses: peaceiris/actions-gh-pages@v3
@@ -72,6 +82,7 @@ jobs:
7282

7383
release-binaries:
7484
name: Publish binaries
85+
needs: publish
7586
strategy:
7687
fail-fast: false
7788
matrix:
@@ -82,25 +93,34 @@ jobs:
8293
rust: stable
8394
target: x86_64-unknown-linux-gnu
8495
asset_name: boa-linux-amd64
96+
binary_name: boa
8597
- build: macos
8698
os: macos-latest
8799
rust: stable
88100
target: x86_64-apple-darwin
89101
asset_name: boa-macos-amd64
102+
binary_name: boa
90103
- build: win-msvc
91104
os: windows-2019
92105
rust: stable
93106
target: x86_64-pc-windows-msvc
94107
asset_name: boa-windows-amd64
108+
binary_name: boa.exe
95109
runs-on: ${{ matrix.os }}
96110
steps:
97-
- uses: actions/checkout@v3
98-
- name: Build
99-
run: cargo build --target ${{ matrix.target }} --verbose --release --locked --bin boa
100-
- name: Upload binaries to release
101-
uses: svenstaro/upload-release-action@v2
102-
with:
103-
repo_token: ${{ secrets.GITHUB_TOKEN }}
104-
file: target/release/${{ matrix.target }}
105-
asset_name: ${{ matrix.asset_name }}
106-
tag: ${{ github.ref }}
111+
- uses: actions/checkout@v4
112+
- name: Install Rust toolchain
113+
uses: actions-rs/toolchain@v1
114+
with:
115+
toolchain: stable
116+
profile: minimal
117+
override: true
118+
- name: Build
119+
run: cargo build --target ${{ matrix.target }} --verbose --release --locked --bin boa
120+
- name: Upload binaries to release
121+
uses: svenstaro/upload-release-action@v2
122+
with:
123+
repo_token: ${{ secrets.GITHUB_TOKEN }}
124+
file: target/${{ matrix.target }}/release/${{ matrix.binary_name }}
125+
asset_name: ${{ matrix.asset_name }}
126+
tag: ${{ github.ref }}

0 commit comments

Comments
 (0)