Skip to content

Commit 82cd248

Browse files
committed
Add publish script to CI.
1 parent 75f2f37 commit 82cd248

6 files changed

Lines changed: 437 additions & 7 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# The purpose of this workflow is to publish the workspace's crates
2+
# whenever a tag is created. This basically boils down to running
3+
# `scripts/publish.rs` at the right time.
4+
5+
name: "Publish to crates.io"
6+
7+
on:
8+
push:
9+
tags:
10+
- 'v*'
11+
12+
jobs:
13+
publish:
14+
if: github.repository == 'bytecodealliance/cargo-component'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- run: rustup update stable && rustup default stable
19+
- run: |
20+
rustc ci/publish.rs
21+
./publish publish
22+
env:
23+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ target/
33
Cargo.lock
44
**/*.rs.bk
55
*.pdb
6+
publish

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "wac"
2+
name = "wac-cli"
33
description = "A tool for encoding and decoding WebAssembly compositions."
44
version = { workspace = true }
55
edition = { workspace = true }
@@ -46,10 +46,10 @@ wit = ["wac-resolver/wit"]
4646
registry = ["wac-resolver/registry", "indicatif"]
4747

4848
[workspace.dependencies]
49-
wac-parser = { path = "crates/wac-parser", default-features = false }
50-
wac-resolver = { path = "crates/wac-resolver", default-features = false }
51-
wac-graph = { path = "crates/wac-graph" }
52-
wac-types = { path = "crates/wac-types" }
49+
wac-parser = { path = "crates/wac-parser", version = "0.1.0", default-features = false }
50+
wac-resolver = { path = "crates/wac-resolver", version = "0.1.0", default-features = false }
51+
wac-graph = { path = "crates/wac-graph", version = "0.1.0" }
52+
wac-types = { path = "crates/wac-types", version = "0.1.0" }
5353
wit-parser = "0.202.0"
5454
wasmparser = "0.202.0"
5555
wit-component = "0.202.0"

0 commit comments

Comments
 (0)