-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eac07ca
commit e22dc66
Showing
2 changed files
with
43 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,9 @@ env: | |
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -30,22 +32,48 @@ jobs: | |
run: cargo fmt -- --check | ||
|
||
- name: Check linting | ||
run: cargo clippy --all-targets --all-features -- -D clippy::all | ||
run: cargo clippy --release --all-targets --all-features -- -D clippy::all | ||
|
||
- name: Build | ||
run: cargo build --all-targets --all-features --tests -v | ||
run: cargo build --release --all-targets --all-features --tests -v | ||
|
||
- name: Test | ||
run: cargo test | ||
run: cargo test --release | ||
|
||
- name: Publish | ||
if: | | ||
runner.os == 'Linux' && | ||
github.repository == 'denoland/denokv' && | ||
startsWith(github.ref, 'refs/tags/') | ||
- name: Prepare artifact (Linux) | ||
if: runner.os == 'Linux' && github.repository == 'denoland/denokv' && startsWith(github.ref, 'refs/tags/') | ||
run: |- | ||
cd target/release | ||
zip -r denokv-x86_64-unknown-linux-gnu.zip denokv | ||
- name: Prepare artifact (macOS) | ||
if: runner.os == 'macOS' && github.repository == 'denoland/denokv' && startsWith(github.ref, 'refs/tags/') | ||
run: |- | ||
cd target/release | ||
zip -r denokv-x86_64-apple-darwin.zip denokv | ||
- name: Prepare artifact (Windows) | ||
if: runner.os == 'Windows' && github.repository == 'denoland/denokv' && startsWith(github.ref, 'refs/tags/') | ||
run: |- | ||
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denokv.exe -DestinationPath target/release/denokv-x86_64-pc-windows-msvc.zip | ||
- name: Upload release to GitHub | ||
uses: softprops/[email protected] | ||
if: github.repository == 'denoland/denokv' && startsWith(github.ref, 'refs/tags/')) | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
files: |- | ||
target/release/denokv-x86_64-pc-windows-msvc.zip | ||
target/release/denokv-x86_64-unknown-linux-gnu.zip | ||
target/release/denokv-x86_64-apple-darwin.zip | ||
draft: true | ||
|
||
- name: Publish to crates.io | ||
if: runner.os == 'Linux' && github.repository == 'denoland/denokv' && startsWith(github.ref, 'refs/tags/') | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
run: | | ||
run: |- | ||
cargo publish -vv -p denokv_proto | ||
cargo publish -vv -p denokv_sqlite | ||
cargo publish -vv -p denokv_remote | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters