Skip to content

Commit 7702b8f

Browse files
committed
build: Use dtolnay/rust-toolchain in a few more places
1 parent 7fd6ba1 commit 7702b8f

File tree

4 files changed

+16
-39
lines changed

4 files changed

+16
-39
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ jobs:
5151
# Starts the server in background
5252
python ./css-inline/tests/server.py &
5353
54-
- uses: actions-rs/toolchain@v1
55-
with:
56-
profile: minimal
57-
toolchain: stable
58-
override: true
54+
- uses: dtolnay/rust-toolchain@stable
5955

6056
- uses: Swatinem/rust-cache@v2
6157
with:

.github/workflows/python-release.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,7 @@ jobs:
2626
with:
2727
python-version: ${{ env.PYTHON_VERSION }}
2828
architecture: x64
29-
- name: Install Rust toolchain
30-
uses: actions-rs/toolchain@v1
31-
with:
32-
toolchain: stable
33-
profile: minimal
34-
default: true
29+
- uses: dtolnay/rust-toolchain@stable
3530
- name: Build sdist
3631
uses: messense/maturin-action@v1
3732
with:
@@ -54,12 +49,7 @@ jobs:
5449
with:
5550
python-version: ${{ env.PYTHON_VERSION }}
5651
architecture: x64
57-
- name: Install Rust toolchain
58-
uses: actions-rs/toolchain@v1
59-
with:
60-
toolchain: stable
61-
profile: minimal
62-
default: true
52+
- uses: dtolnay/rust-toolchain@stable
6353
- name: Build wheels - x86_64
6454
uses: messense/maturin-action@v1
6555
with:
@@ -82,12 +72,7 @@ jobs:
8272
with:
8373
python-version: ${{ env.PYTHON_VERSION }}
8474
architecture: x64
85-
- name: Install Rust toolchain
86-
uses: actions-rs/toolchain@v1
87-
with:
88-
toolchain: stable
89-
profile: minimal
90-
default: true
75+
- uses: dtolnay/rust-toolchain@stable
9176
- name: Build wheels - universal2
9277
uses: messense/maturin-action@v1
9378
with:
@@ -112,12 +97,7 @@ jobs:
11297
with:
11398
python-version: ${{ env.PYTHON_VERSION }}
11499
architecture: ${{ matrix.target }}
115-
- name: Install Rust toolchain
116-
uses: actions-rs/toolchain@v1
117-
with:
118-
toolchain: stable
119-
profile: minimal
120-
default: true
100+
- uses: dtolnay/rust-toolchain@stable
121101
- name: Build wheels
122102
uses: messense/maturin-action@v1
123103
with:

.github/workflows/rust-release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
steps:
1212
- uses: actions/checkout@v3
13-
- uses: actions-rs/toolchain@v1
14-
with:
15-
profile: minimal
16-
toolchain: stable
17-
override: true
13+
14+
- uses: dtolnay/rust-toolchain@stable
15+
1816
- run: cargo login ${CRATES_IO_TOKEN}
1917
env:
2018
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
19+
2120
- run: cargo publish --manifest-path css-inline/Cargo.toml

.github/workflows/wasm-release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,29 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
steps:
1212
- uses: actions/checkout@v3
13-
- uses: actions-rs/toolchain@v1
14-
with:
15-
profile: minimal
16-
toolchain: stable
17-
override: true
13+
14+
- uses: dtolnay/rust-toolchain@stable
15+
1816
- name: Install wasm-pack
1917
uses: actions-rs/cargo@v1
2018
with:
2119
command: install
2220
args: wasm-pack
21+
2322
- name: Build package
2423
run: wasm-pack build --release --target nodejs
2524
working-directory: ./bindings/wasm
25+
2626
- name: Fix package name
2727
# wasm-pack generates the package name from the crate name.
2828
# Since the original Rust crate has this name (`css-inline`), the WASM crate has `css-inline-wasm` to
2929
# avoid conflicts during the build. The easiest way to handle it is to rename it inside the package.json file.
3030
run: sed -i 's/css-inline-wasm/css-inline/' pkg/package.json
3131
working-directory: ./bindings/wasm
32+
3233
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
3334
env:
3435
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
36+
3537
- run: npm publish --access public
3638
working-directory: ./bindings/wasm/pkg

0 commit comments

Comments
 (0)