From 0afde4fa01e95910b25397fa55898527a9f24724 Mon Sep 17 00:00:00 2001 From: Dmitrii Kovanikov Date: Mon, 29 Aug 2022 15:16:54 +0100 Subject: [PATCH] [#6] Setup binary releases (#45) Resolves #6 --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ Cargo.toml | 4 ++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a153337 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +on: + # Trigger the workflow on the new 'v*' tag created + push: + tags: + - "v*" + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: taiki-e/create-gh-release-action@v1 + with: + draft: true + env: + # (required) + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + upload-assets: + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: taiki-e/upload-rust-binary-action@v1 + with: + bin: tool + # (optional) On which platform to distribute the `.tar.gz` file. + # [default value: unix] + # [possible values: all, unix, windows, none] + tar: unix + # (optional) On which platform to distribute the `.zip` file. + # [default value: windows] + # [possible values: all, unix, windows, none] + zip: windows + env: + # (required) + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index c81b2bb..a09fada 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,10 @@ keywords = ["cli", "sync", "download", "tools"] categories = ["command-line-utilities"] edition = "2021" +[[bin]] +name = "tool" +path = "src/main.rs" + [dependencies] clap = { version = "3.2.17", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }