Skip to content
36 changes: 20 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
name: Publish workspace crates

on:
workflow_dispatch: {}
push:
# Sequence of patterns matched against refs/tags
paths:
- "**/Cargo.toml"
- ".github/workflows/publish.yml"
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Publish
- "v*"
pull_request:
paths:
- "**/Cargo.toml"
- ".github/workflows/publish.yml"

jobs:
publish:
name: Publish
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: |
cargo publish ${ARGS} --package sqlx-rt-oldapi
cargo publish ${ARGS} --package sqlx-core-oldapi
cargo publish ${ARGS} --package sqlx-macros-oldapi
cargo publish ${ARGS} --package sqlx-oldapi
env:
ARGS:
--token ${{ secrets.CRATES_TOKEN }}
--no-default-features
--features runtime-actix-rustls
- name: Publish workspace
run: |
cargo publish \
${{ startsWith(github.ref, 'refs/tags/v') && '' || '--dry-run' }} \
--workspace \
--token ${{ secrets.CRATES_TOKEN }} \
--no-default-features \
--features runtime-actix-rustls
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ runtime-actix-native-tls = ["runtime-tokio-native-tls"]
runtime-async-std-native-tls = [
"sqlx-core/runtime-async-std-native-tls",
"sqlx-macros/runtime-async-std-native-tls",
"sqlx-rt/runtime-async-std-native-tls",
"_rt-async-std",
]
runtime-tokio-native-tls = [
Expand All @@ -95,25 +96,29 @@ runtime-actix-rustls = ["runtime-tokio-rustls"]
runtime-async-std-rustls = [
"sqlx-core/runtime-async-std-rustls",
"sqlx-macros/runtime-async-std-rustls",
"sqlx-rt/runtime-async-std-rustls",
"aws_lc_rs",
"tls12",
"_rt-async-std",
]
runtime-async-std-rustls-nocrypto = [
"sqlx-core/runtime-async-std-rustls",
"sqlx-macros/runtime-async-std-rustls",
"sqlx-rt/runtime-async-std-rustls",
"_rt-async-std",
]
runtime-tokio-rustls = [
"sqlx-core/runtime-tokio-rustls",
"sqlx-macros/runtime-tokio-rustls",
"sqlx-rt/runtime-tokio-rustls",
"aws_lc_rs",
"tls12",
"_rt-tokio",
]
runtime-tokio-rustls-nocrypto = [
"sqlx-core/runtime-tokio-rustls",
"sqlx-macros/runtime-tokio-rustls",
"sqlx-rt/runtime-tokio-rustls",
"_rt-tokio",
]

Expand Down
1 change: 1 addition & 0 deletions examples/mysql/todos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "sqlx-example-mysql-todos"
version = "0.1.0"
edition = "2021"
publish = false
workspace = "../../../"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions examples/postgres/axum-social-with-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "sqlx-example-postgres-axum-social"
version = "0.1.0"
edition = "2021"
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions examples/postgres/files/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "files"
version = "0.1.0"
edition = "2021"
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions examples/postgres/json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "json"
version = "0.1.0"
edition = "2021"
publish = false
workspace = "../../../"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions examples/postgres/listen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "sqlx-example-postgres-listen"
version = "0.1.0"
edition = "2021"
publish = false
workspace = "../../../"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions examples/postgres/mockable-todos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "sqlx-example-postgres-mockable-todos"
version = "0.1.0"
edition = "2021"
publish = false
workspace = "../../../"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions examples/postgres/todos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "sqlx-example-postgres-todos"
version = "0.1.0"
edition = "2018"
publish = false
workspace = "../../../"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions examples/postgres/transaction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "sqlx-example-postgres-transaction"
version = "0.1.0"
edition = "2021"
publish = false
workspace = "../../../"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions examples/sqlite/todos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "sqlx-example-sqlite-todos"
version = "0.1.0"
edition = "2018"
publish = false
workspace = "../../../"

[dependencies]
Expand Down
4 changes: 4 additions & 0 deletions sqlx-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ authors = [
"Jesper Axelsson <[email protected]>",
"Austin Bonander <[email protected]>",
]
publish = false

[[bin]]
name = "sqlx"
Expand Down Expand Up @@ -55,6 +56,9 @@ backoff = { version = "0.4.0", features = ["futures", "tokio"] }
default = ["postgres", "sqlite", "mysql", "native-tls"]
rustls = ["sqlx/runtime-tokio-rustls"]
native-tls = ["sqlx/runtime-tokio-native-tls"]
runtime-actix-rustls = ["sqlx/runtime-actix-rustls"]
runtime-async-std-rustls = ["sqlx/runtime-async-std-rustls"]
runtime-tokio-rustls = ["sqlx/runtime-tokio-rustls"]

# databases
mysql = ["sqlx/mysql"]
Expand Down
Loading