Skip to content

Commit

Permalink
chore: ci for release
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Apr 19, 2024
1 parent 0dc194a commit f182a17
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 6 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- v*

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

upload-assets:
needs: create-release
strategy:
matrix:
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@v3
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: gossiphs
zip: all
tar: none
target: ${{ matrix.target }}
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 }}
16 changes: 13 additions & 3 deletions Cargo.lock

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

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[package]
name = "gossiphs"
version = "0.1.0"
version = "0.1.5"
edition = "2021"
description = "gossip graphs for general code relationship analysis"
license = "Apache-2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -10,7 +12,7 @@ clap = { version = "4.5.4", features = ["derive"] }
tracing = "0.1.40"
serde_json = "1.0.115"
tracing-subscriber = "0.3.18"
cupido = "0.3.4"
cupido = { version = "0.3.4", features = ["vendored-openssl"] }
tree-sitter = "~0.20.10"
tree-sitter-rust = "0.20.4"
petgraph = "0.6.4"
Expand All @@ -21,4 +23,4 @@ indicatif = "0.17.8"
inquire = "0.7.4"

[build-dependencies]
cc = "*"
cc = "1.0.94"

0 comments on commit f182a17

Please sign in to comment.