Skip to content

Commit

Permalink
Prepare to use cargo release for releases (#795)
Browse files Browse the repository at this point in the history
* Prepare to use `cargo release` for releases

* .
  • Loading branch information
max-sixty committed Jul 10, 2022
1 parent fb4ce62 commit 3127acd
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
build-python-wheels:
uses: ./.github/workflows/python.yaml

publish-to-pypi:
release-prql-pythqn:
runs-on: ubuntu-latest
needs: [build-python-wheels]
steps:
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@ members = [
[profile.release.package.prql-js]
# Tell `rustc` to optimize for small code size.
opt-level = "s"

[workspace.metadata.release]
allow-branch = ["main", "release"]
consolidate-commits = true
consolidate-pushes = true
shared-version = true
# These don't seem to be active for workspace...
# tag-name = "{{version}}"
# tag-prefix = ""
7 changes: 6 additions & 1 deletion book/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "mdbook-prql"
publish = false
repository = "https://github.com/prql/prql"
rust-version = "1.59.0"
version = "0.1.1"
version = "0.2.2"

[dependencies]
anyhow = "1.0.57"
Expand Down Expand Up @@ -34,3 +34,8 @@ walkdir = "2.3.2"

[target.'cfg(not(target_family="wasm"))'.dev-dependencies]
trash = "2.1.3"

[package.metadata.release]
shared-version = true
tag-name = "{{version}}"
tag-prefix = ""
7 changes: 6 additions & 1 deletion prql-compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license = "Apache-2.0"
name = "prql-compiler"
repository = "https://github.com/prql/prql"
rust-version = "1.59.0"
version = "0.2.1"
version = "0.2.2"

[features]
# We previously had `cli` not compile by default, because of an issue with
Expand Down Expand Up @@ -67,3 +67,8 @@ duckdb = {version = "0.4.0", features = ["bundled", "chrono"]}
[[bench]]
harness = false
name = "bench"

[package.metadata.release]
shared-version = true
tag-name = "{{version}}"
tag-prefix = ""
13 changes: 9 additions & 4 deletions prql-java/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
[package]
name = "prql-java"
version = "0.2.1"
edition = "2021"
name = "prql-java"
publish = false
version = "0.2.2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
crate_type = ["cdylib"]

[dependencies]
prql-compiler = {path = "../prql-compiler"}
jni = "0.19.0"
prql-compiler = {path = "../prql-compiler"}

[package.metadata.release]
shared-version = true
tag-name = "{{version}}"
tag-prefix = ""
8 changes: 7 additions & 1 deletion prql-js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ description = "Javascript bindings for prql-compiler"
edition = "2018"
license = "Apache-2.0"
name = "prql-js"
publish = false
repository = "https://github.com/prql/prql"
version = "0.1.3"
version = "0.2.2"

[lib]
crate-type = ["cdylib", "rlib"]
Expand All @@ -31,3 +32,8 @@ wee_alloc = {version = "0.4.5", optional = true}

[dev-dependencies]
wasm-bindgen-test = "0.3.30"

[package.metadata.release]
shared-version = true
tag-name = "{{version}}"
tag-prefix = ""
8 changes: 7 additions & 1 deletion prql-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
build = "build.rs"
edition = "2021"
name = "prql-python"
version = "0.2.1"
publish = false
version = "0.2.2"

[lib]
crate-type = ["cdylib"]
Expand All @@ -16,3 +17,8 @@ prql-compiler = {path = "../prql-compiler"}

[build-dependencies]
pyo3-build-config = "0.16.5"

[package.metadata.release]
shared-version = true
tag-name = "{{version}}"
tag-prefix = ""
5 changes: 4 additions & 1 deletion prql-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
`prql-python` offers rust bindings to the `prql-compiler` rust library. It
exposes a python method `to_sql(query: str) -> str`.

This is consumed by [PyPrql](https://github.com/prql/PyPrql).
This is consumed by [PyPrql](https://github.com/prql/PyPrql) &
[dbt-prql](https://github.com/prql/dbt-prql).

The crate is not published to crates.io; only to PyPI.

## Installation

Expand Down

0 comments on commit 3127acd

Please sign in to comment.