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 55c55ad
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 18 deletions.
47 changes: 31 additions & 16 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,42 @@ 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: ""
os: windows-latest

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

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 }}
54 changes: 53 additions & 1 deletion Cargo.lock

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

4 changes: 3 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.1"
edition = "2021"
description = "Explore your codebase with graph view."
license = "Apache-2.0"
Expand All @@ -19,6 +19,8 @@ tracing-subscriber = "0.3"
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
openssl = { version = "0.10", features = ["vendored"] }

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

0 comments on commit 55c55ad

Please sign in to comment.