From fddccf7aef24dc2c95a3f42f30e31382deb10820 Mon Sep 17 00:00:00 2001 From: Ricky Lopez Date: Tue, 14 May 2024 16:21:19 -0700 Subject: [PATCH] Update readme and make tagged releases include tag name in archive --- .github/actions/archive/action.yml | 8 ++++++-- README.md | 11 +++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/actions/archive/action.yml b/.github/actions/archive/action.yml index 6d96fde..ee0de2f 100644 --- a/.github/actions/archive/action.yml +++ b/.github/actions/archive/action.yml @@ -24,7 +24,11 @@ runs: [[ -z $sha_short ]] && sha_short="unknown" echo "sha_short=$sha_short" >> "$GITHUB_OUTPUT" - export archive_name="conUDS_${sha_short}_${{ inputs.target }}.zip" + if [[ ${{ startsWith(github.ref, 'refs/tags/v') }} ]]; then + export archive_name="conUDS_${{ github.ref_name }}_${{ inputs.target }}.zip" + else + export archive_name="conUDS_${sha_short}_${{ inputs.target }}.zip" + fi echo "archive_name=$archive_name" >> "$GITHUB_OUTPUT" cat "$GITHUB_OUTPUT" @@ -36,4 +40,4 @@ runs: sha256sum $archive_name > CHECKSUM rm "./conUDS/conUDS" - printf "\n✔ Successfully created the archive.\n" + printf "\n✔ Successfully created the archive: %s.\n" $archive_name diff --git a/README.md b/README.md index 5d3f737..f874727 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,19 @@ So far, this UDS client supports: - App Downloading # Building the Application -Releases are not currently set up yet, though eventually you will be able to simply download -a zip file containing the binary. -For now, you must set up Rust on your computer and use Cargo to build this application. Instructions for +## Download a release +Download a pre-built and packaged release from [the releases page](https://github.com/concordia-fsae/conUDS/releases). +Unzip it, and follow the rest of the instructions + +## Build it yourself +You must have Rust and Cargo set up on your computer in order to build this application. Instructions for setting up Rust are ubiquitous, so details are not provided here. See [here](https://www.rust-lang.org/tools/install) for instructions. Once Rust is installed, simply clone this repo, cd into the `conUDS` directory contained within it, and build the application with Cargo: -`cargo build --release` +`cargo build --release` (you may omit the `--release` if you know what you're doing) The resulting binary lives in the `target` directory which is created when building.