Skip to content

Commit 69acdfb

Browse files
committed
chore(ci): simplify publish workflow
1 parent 8b59258 commit 69acdfb

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/publish.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,19 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- uses: dtolnay/rust-toolchain@stable
18-
1917
- uses: Swatinem/rust-cache@v2
18+
with:
19+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
20+
restore-keys: |
21+
${{ runner.os }}-cargo-
2022
21-
- name: Verify tag version matches Cargo.toml
22-
run: |
23-
TAG_VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
24-
CARGO_VERSION=$(cargo pkgid | sed 's/.*#//')
25-
if [ "$TAG_VERSION" != "$CARGO_VERSION" ]; then
26-
echo "Tag version ($TAG_VERSION) does not match Cargo.toml version ($CARGO_VERSION)"
27-
exit 1
28-
fi
23+
- uses: dtolnay/rust-toolchain@stable
24+
25+
- name: Install wasm32 target
26+
run: rustup target add wasm32-unknown-unknown
2927

30-
- name: Run tests
31-
run: cargo test --all-features
28+
- name: Test
29+
run: cargo test --all-features --locked
3230

3331
- name: Verify package
3432
run: cargo publish --dry-run

0 commit comments

Comments
 (0)