Skip to content

Commit

Permalink
Use better release-artifact names.
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch committed Nov 7, 2024
1 parent 5c8e4df commit 369b053
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [v2.0.0-alpha.130, latest, ""]
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
version: [v2.0.0-alpha.130, v2.0.0-alpha.164, latest, ""]

runs-on: ${{ matrix.os }}

Expand Down
72 changes: 64 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,72 @@ runs:
run: |
TOIT_VERSION=${{ inputs.toit-version }}
if [[ "$RUNNER_OS" = "Linux" ]]; then
TOIT_FILE=toit-linux.tar.gz
elif [[ "$RUNNER_OS" = "macOS" ]]; then
TOIT_FILE=toit-macos.tar.gz
elif [[ "$RUNNER_OS" = "Windows" ]]; then
TOIT_FILE=toit-windows.tar.gz
BETTER_NAME_VERSION=v2.0.0-alpha.163
# Use sort -V to compare versions.
if [[ "$TOIT_VERSION" == "latest" ]] || [[ "$(echo -e "$BETTER_NAME_VERSION\n$TOIT_VERSION" | sort -V | tail -n 1)" == "$TOIT_VERSION" ]]; then
if [[ "$RUNNER_OS" = "Linux" ]]; then
case "$(uname -m)" in
x86_64)
TOIT_FILE=toit-linux-x64.tar.gz
;;
armv7l)
TOIT_FILE=toit-linux-armv7.tar.gz
;;
aarch64)
TOIT_FILE=toit-linux-aarch64.tar.gz
;;
*)
echo "UNSUPPORTED ARCHITECTURE: $(uname -m)"
exit 1
;;
esac
elif [[ "$RUNNER_OS" = "macOS" ]]; then
case "$(uname -m)" in
x86_64)
TOIT_FILE=toit-macos-x64.tar.gz
;;
arm64)
TOIT_FILE=toit-macos-aarch64.tar.gz
;;
*)
echo "UNSUPPORTED ARCHITECTURE: $(uname -m)"
exit 1
;;
esac
elif [[ "$RUNNER_OS" = "Windows" ]]; then
TOIT_FILE=toit-windows-x64.tar.gz
else
echo "UNSUPPORTED RUNNER: $RUNNER_OS"
exit 1
fi
else
echo "UNSUPPORTED RUNNER: $RUNNER_OS"
exit 1
if [[ "$RUNNER_OS" = "Linux" ]]; then
case "$(uname -m)" in
x86_64)
TOIT_FILE=toit-linux.tar.gz
;;
armv7l)
TOIT_FILE=toit-rpi.tar.gz
;;
aarch64)
TOIT_FILE=toit-aarch64.tar.gz
;;
*)
echo "UNSUPPORTED ARCHITECTURE: $(uname -m)"
exit 1
;;
esac
elif [[ "$RUNNER_OS" = "macOS" ]]; then
TOIT_FILE=toit-macos.tar.gz
elif [[ "$RUNNER_OS" = "Windows" ]]; then
TOIT_FILE=toit-windows.tar.gz
else
echo "UNSUPPORTED RUNNER: $RUNNER_OS"
exit 1
fi
fi
echo "TOIT_FILE=$TOIT_FILE" >> $GITHUB_OUTPUT
if [[ $TOIT_VERSION = latest ]]; then
Expand Down

0 comments on commit 369b053

Please sign in to comment.