Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add support for releasing all rust packages #4200

Merged
merged 6 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# specific language governing permissions and limitations
# under the License.

name: Publish
# This workflow is used for publish all rust based packages

name: Release Rust Packages

on:
push:
Expand All @@ -25,13 +27,24 @@ on:
branches:
- main
paths:
- ".github/workflows/release_core.yml"
- ".github/workflows/release_rust.yml"
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
strategy:
# Publish package one by one instead of flooding the registry
max-parallel: 1
matrix:
# Order here is sensitive, as it will be used to determine the order of publishing
package:
- "core"
- "integrations/dav-server"
- "integrations/object_store"
- "bin/oay" # depends on integrations/dav-server
- "bin/oli"
- "bin/ofs"
steps:
- uses: actions/checkout@v4
- name: Checkout python env
Expand All @@ -50,17 +63,16 @@ jobs:
need-rocksdb: true
need-protoc: true

- name: Dryrun opendal
working-directory: "core"
if: "contains(github.ref, '-')"
- name: Dryrun ${{ matrix.package }}
working-directory: ${{ matrix.package }}
run: cargo publish --all-features --dry-run
env:
LD_LIBRARY_PATH: ${{ env.JAVA_HOME }}/lib/server:${{ env.LD_LIBRARY_PATH }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Publish opendal
working-directory: "core"
if: "!contains(github.ref, '-')"
- name: Publish ${{ matrix.package }}
working-directory: ${{ matrix.package }}
# Only publish if it's a tag and the tag is not a pre-release
if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-') }}
run: cargo publish --all-features
env:
LD_LIBRARY_PATH: ${{ env.JAVA_HOME }}/lib/server:${{ env.LD_LIBRARY_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion bin/oay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bytes = { version = "1.5.0", optional = true }
chrono = "0.4.31"
clap = { version = "4", features = ["cargo", "string"] }
dav-server = { version = "0.5.8", optional = true }
dav-server-opendalfs = { path = "../../integrations/dav-server", optional = true }
dav-server-opendalfs = { version = "0.0.0", path = "../../integrations/dav-server", optional = true }
dirs = "5.0.1"
futures = "0.3"
futures-util = { version = "0.3.29", optional = true }
Expand Down
Loading