Skip to content

Commit fbf2971

Browse files
committed
ci: add automatic publish to crates.io
1 parent f2a426e commit fbf2971

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,30 @@ jobs:
152152
with:
153153
name: src_binding_ptrcomp_release_${{ matrix.config.target }}.rs
154154
path: target/src_binding_ptrcomp_release_${{ matrix.config.target }}.rs
155+
156+
publish:
157+
name: Publish to crates.io
158+
needs: build
159+
runs-on: ubuntu-22.04
160+
if: startsWith(github.ref, 'refs/tags/v')
161+
steps:
162+
- name: Clone repository
163+
uses: actions/checkout@v4
164+
with:
165+
fetch-depth: 10
166+
submodules: false
167+
168+
- name: Install rust
169+
uses: dsherret/rust-toolchain-file@v1
170+
171+
- name: Download artifacts
172+
uses: actions/download-artifact@v4
173+
with:
174+
path: gen
175+
pattern: src_binding_*.rs
176+
merge-multiple: true
177+
178+
- name: Publish
179+
env:
180+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
181+
run: cargo publish -vv --locked --allow-dirty --no-verify

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ authors = ["the Deno authors", "max-lt <contact@openworkers.dev>"]
77
license = "MIT"
88
edition = "2024"
99
repository = "https://github.com/max-lt/rusty_v8"
10+
1011
exclude = [
1112
# To keep the package under the 10mb limit imposed by crates.io we exclude
1213
# a lot of files that are not needed for the build.
@@ -92,6 +93,9 @@ exclude = [
9293
"!v8/tools/testrunner/utils/dump_build_config.py",
9394
]
9495

96+
[lib]
97+
name = "v8"
98+
9599
[profile.dev]
96100
# rusty_v8 may miscompile at opt-level=0.
97101
# https://github.com/rust-lang/rust/issues/87215

0 commit comments

Comments
 (0)