Skip to content

Commit

Permalink
fix(ci): publish crates.io from main (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored Oct 10, 2023
1 parent c0fb95e commit be847b4
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 31 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish

on:
push:
branches:
- main
paths:
- "Cargo.toml"

jobs:
crates:
runs-on: ubuntu-latest
environment:
name: crates.io
url: https://crates.io/crates/databend-driver
steps:
- uses: actions/checkout@v4
- name: Setup Cargo Release
run: |
cargo install cargo-quickinstall
cargo quickinstall cargo-release
- name: Release to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo release publish --execute --no-confirm
21 changes: 0 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,7 @@ on:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
environment:
name: crates.io
url: https://crates.io/crates/databend-driver
steps:
- uses: actions/checkout@v4
- name: Setup Cargo Release
run: |
curl -fsSLo /tmp/cargo-release.tar.gz https://github.com/crate-ci/cargo-release/releases/download/v0.24.12/cargo-release-v0.24.12-x86_64-unknown-linux-gnu.tar.gz
mkdir -p /tmp/cargo-release
tar -C /tmp/cargo-release -xzf /tmp/cargo-release.tar.gz
sudo mv /tmp/cargo-release/cargo-release /usr/local/bin
- name: Release to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo release publish --execute --no-confirm
build_linux:
needs: publish
name: build ${{ matrix.target }}
strategy:
matrix:
Expand Down Expand Up @@ -62,7 +42,6 @@ jobs:
gh release upload ${{ github.ref_name }} dist/bendsql-${{ matrix.target }}.tar.gz --clobber
build_other:
needs: publish
name: build ${{ matrix.target }}
strategy:
matrix:
Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.8.1"
version = "0.8.2"
edition = "2021"
license = "Apache-2.0"
authors = ["Databend Authors <opensource@datafuselabs.com>"]
Expand All @@ -21,7 +21,7 @@ keywords = ["databend", "database"]
repository = "https://github.com/datafuselabs/bendsql"

[workspace.dependencies]
databend-client = { path = "core", version = "0.8.1" }
databend-driver = { path = "driver", version = "0.8.1" }
databend-driver-macros = { path = "macros", version = "0.8.1" }
databend-sql = { path = "sql", version = "0.8.1" }
databend-client = { path = "core", version = "0.8.2" }
databend-driver = { path = "driver", version = "0.8.2" }
databend-driver-macros = { path = "macros", version = "0.8.2" }
databend-sql = { path = "sql", version = "0.8.2" }
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@databend-driver/lib-darwin-arm64",
"repository": "https://github.com/datafuselabs/bendsql.git",
"version": "0.8.1",
"version": "0.8.2",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@databend-driver/lib-darwin-x64",
"repository": "https://github.com/datafuselabs/bendsql.git",
"version": "0.8.1",
"version": "0.8.2",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@databend-driver/lib-linux-x64-gnu",
"repository": "https://github.com/datafuselabs/bendsql.git",
"version": "0.8.1",
"version": "0.8.2",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@databend-driver/lib-win32-x64-msvc",
"repository": "https://github.com/datafuselabs/bendsql.git",
"version": "0.8.1",
"version": "0.8.2",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "databend-driver",
"author": "Databend Authors <opensource@datafuselabs.com>",
"version": "0.8.1",
"version": "0.8.2",
"license": "Apache-2.0",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit be847b4

Please sign in to comment.