-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.8 KB
/
release.yml
File metadata and controls
42 lines (42 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Release
on:
workflow_dispatch:
permissions:
contents: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0 # v6.0.3
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: { node-version: 24, cache: pnpm, registry-url: 'https://registry.npmjs.org' }
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1
with: { rustflags: "" }
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- run: rustup target add wasm32-unknown-unknown
- name: Install wasm-pack 0.14.0
run: cargo install wasm-pack --version 0.14.0 --locked
- run: pnpm install --frozen-lockfile
- run: pnpm -r build
- run: pnpm changeset publish
env:
NPM_CONFIG_PROVENANCE: true
- name: Push git tags
run: git push origin --tags
- name: Derive version
id: ver
run: echo "v=v$(node -p "require('./packages/codec/package.json').version")" >> "$GITHUB_OUTPUT"
- name: Create GitHub Release
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
tag_name: ${{ steps.ver.outputs.v }}
generate_release_notes: true
- name: Obtain crates.io OIDC token
uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe # v1.0.4
id: crates-io-auth
- name: Publish to crates.io
run: cargo publish -p void-layer-codec --manifest-path packages/codec/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }}