diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..864c382 --- /dev/null +++ b/.github/workflows/release.yaml @@ -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 }} diff --git a/Cargo.lock b/Cargo.lock index 4480d6c..c0eb035 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -187,9 +187,9 @@ checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd97381a8cc6493395a5afc4c691c1084b3768db713b73aa215217aa245d153" +checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" dependencies = [ "jobserver", "libc", @@ -419,7 +419,7 @@ dependencies = [ [[package]] name = "gossiphs" -version = "0.1.0" +version = "0.1.2" dependencies = [ "cc", "clap", diff --git a/Cargo.toml b/Cargo.toml index 835af72..fa59c07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "gossiphs" -version = "0.1.0" +version = "0.1.2" 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 @@ -21,4 +23,4 @@ indicatif = "0.17.8" inquire = "0.7.4" [build-dependencies] -cc = "*" +cc = "1.0.94"