Skip to content

Commit

Permalink
chore(#17): multi targets in releases
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Mar 7, 2024
1 parent a3a955d commit 8621de8
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 20 deletions.
50 changes: 32 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ on:
- v*

jobs:
cargo-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

create-release:
runs-on: ubuntu-latest
steps:
Expand All @@ -33,15 +21,41 @@ jobs:
needs: create-release
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
include:
# Ubuntu
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
# Mac OS
- target: universal-apple-darwin
os: macos-latest
# Windows
- target: x86_64-pc-windows-msvc
os: windows-latest

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: cupido
zip: all
token: ${{ secrets.GITHUB_TOKEN }}
tar: none
target: ${{ matrix.target }}
features: vendored-openssl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cargo-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
12 changes: 11 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cupido"
version = "0.3.0"
version = "0.3.2"
edition = "2021"
description = "Explore your codebase with graph view."
license = "Apache-2.0"
Expand All @@ -20,6 +20,11 @@ regex = "1.10.2"
clap = { version = "4.4.18", features = ["derive"] }
indicatif = "0.17.8"

# for cross: https://github.com/cross-rs/cross/wiki/FAQ#openssl-is-not-installed
[features]
default = []
vendored-openssl = ["git2/vendored-openssl"]

[dev-dependencies]
criterion = { version = "0.5.1", features = ["html_reports"] }

Expand Down

0 comments on commit 8621de8

Please sign in to comment.