Skip to content

Commit f2c2057

Browse files
committed
Add the crates package information
1 parent 449996f commit f2c2057

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/workflows/publish.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# k2hash_rust
2+
#
3+
# Copyright 2025 LY Corporation.
4+
#
5+
# Rust driver for k2hash that is a NoSQL Key Value Store(KVS) library.
6+
# For k2hash, see https://github.com/yahoojapan/k2hash for the details.
7+
#
8+
# For the full copyright and license information, please view
9+
# the license file that was distributed with this source code.
10+
#
11+
# AUTHOR: Hirotaka Wakabayashi
12+
# CREATE: Fri, 17 Jul 2025
13+
# REVISION:
14+
#
15+
16+
name: CI & Publish
17+
18+
on:
19+
push:
20+
tags:
21+
- 'v*'
22+
23+
jobs:
24+
test:
25+
strategy:
26+
matrix:
27+
toolchain: [stable, beta, nightly]
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Install dependencies
32+
run: ./.github/scripts/install_dependencies.sh
33+
- name: Set up Rust
34+
uses: actions-rs/toolchain@v1
35+
with:
36+
toolchain: ${{ matrix.toolchain }}
37+
profile: minimal
38+
- run: cargo build --verbose
39+
- name: Run tests
40+
run: RUST_BACKTRACE=1 cargo test --workspace --all-features --all-targets --verbose
41+
- name: Build docs
42+
run: cargo doc --no-deps
43+
44+
publish:
45+
if: startsWith(github.ref, 'refs/tags')
46+
runs-on: ubuntu-latest
47+
needs: test
48+
steps:
49+
- uses: actions/checkout@v4
50+
- name: Set up Rust
51+
uses: actions-rs/toolchain@v1
52+
with:
53+
toolchain: stable
54+
profile: minimal
55+
- name: Publish to crates.io
56+
env:
57+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
58+
run: cargo publish --token $CARGO_REGISTRY_TOKEN
59+
60+
#
61+
# Local variables:
62+
# tab-width: 4
63+
# c-basic-offset: 4
64+
# End:
65+
# vim600: expandtab sw=4 ts=4 fdm=marker
66+
# vim<600: expandtab sw=4 ts=4
67+
#

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "1.0.0"
44
edition = "2021"
55
description = "Official k2hash Rust Driver"
66
build = "build.rs"
7+
license = "MIT"
78

89
[dependencies]
910
libc = "0.2"

0 commit comments

Comments
 (0)