diff --git a/.github/workflows/burrito-release.yaml b/.github/workflows/burrito-release.yaml index 06a84f9..c582005 100644 --- a/.github/workflows/burrito-release.yaml +++ b/.github/workflows/burrito-release.yaml @@ -76,12 +76,43 @@ jobs: fi done [ "$missing" -eq 0 ] + - + # A bare `lc_macos_aarch64` binary download doesn't get you + # lcreate/lcls/lclose/lcomment/lproj - only install.sh and the + # container image ever pulled those, straight from the repo + # checkout, never from a release asset. Package each target + # together with the wrapper scripts so a release download is + # actually installable on its own, matching what install.sh gives + # you. + name: Package each target into a per-platform tarball with the wrapper scripts + run: | + for artifact in lc_* + do + case "$artifact" in + lc_windows_x86_64.exe) + target=lc_windows_x86_64 + binary_name=lc.exe + ;; + *) + target=$artifact + binary_name=lc + ;; + esac + + stage=$(mktemp -d) + cp "$artifact" "$stage/$binary_name" + cp ../../bin/lcreate ../../bin/lcls ../../bin/lclose ../../bin/lcomment ../../bin/lproj "$stage/" + chmod +x "$stage"/* + tar -czf "${target}.tar.gz" -C "$stage" . + rm -rf "$stage" "$artifact" + done + working-directory: app/burrito_out - name: Generate checksums for every built artifact run: sha256sum * > SHA256SUMS working-directory: app/burrito_out - - name: Upload binaries and checksums to the GitHub release + name: Upload release tarballs and checksums to the GitHub release env: GH_TOKEN: ${{ github.token }} run: gh release upload "${{ inputs.tag_name }}" app/burrito_out/* --clobber diff --git a/Readme.adoc b/Readme.adoc index ac84a31..5cd2bcc 100644 --- a/Readme.adoc +++ b/Readme.adoc @@ -37,18 +37,20 @@ to an empty value (as above) for one-off interactive CLI usage - otherwise === Download a release binary (Most should use this) -Grab the binary for your platform from the +Grab the tarball for your platform from the https://github.com/rubyists/linear-cli-ex/releases[latest release] - macOS (Apple Silicon), Linux (x86_64), and Windows (x86_64) are all built as -standalone executables with no Erlang/Elixir install required. +standalone executables with no Erlang/Elixir install required. Each tarball +bundles `lc` with the wrapper scripts (`lcreate`, `lcls`, `lclose`, +`lcomment`, `lproj`). [source,sh] ---- -$ curl -sLO https://github.com/rubyists/linear-cli-ex/releases/latest/download/lc_macos_aarch64 +$ curl -sLO https://github.com/rubyists/linear-cli-ex/releases/latest/download/lc_macos_aarch64.tar.gz $ curl -sLo SHA256SUMS https://github.com/rubyists/linear-cli-ex/releases/latest/download/SHA256SUMS -$ grep -q lc_macos_aarch64 SHA256SUMS && grep lc_macos_aarch64 SHA256SUMS | shasum -a 256 -c - <1> -$ chmod +x lc_macos_aarch64 -$ sudo mv lc_macos_aarch64 /usr/local/bin/lc +$ grep -q lc_macos_aarch64.tar.gz SHA256SUMS && grep lc_macos_aarch64.tar.gz SHA256SUMS | shasum -a 256 -c - <1> +$ mkdir lc && tar -xzf lc_macos_aarch64.tar.gz -C lc +$ sudo mv lc/* /usr/local/bin/ ---- <1> Linux: `sha256sum -c -` instead of `shasum -a 256 -c -`.