From bde706b71ed21d7ae207413b4c3ff0d5f30c46d5 Mon Sep 17 00:00:00 2001 From: Paul Delafosse Date: Sat, 18 Oct 2025 15:07:10 +0200 Subject: [PATCH 1/5] chore: rename workflows --- .github/workflows/Deploy.yaml | 2 +- .github/workflows/Release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Deploy.yaml b/.github/workflows/Deploy.yaml index 3a0e194..c67c3b9 100644 --- a/.github/workflows/Deploy.yaml +++ b/.github/workflows/Deploy.yaml @@ -1,4 +1,4 @@ -name: Create Release +name: Create Github Release on: push: diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 4519a4f..b820435 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -1,4 +1,4 @@ -name: Release +name: Autobump on: workflow_dispatch: From 78e97a2f31ff3ff92fad6e9cb084e53614269c65 Mon Sep 17 00:00:00 2001 From: Paul Delafosse Date: Sat, 18 Oct 2025 15:08:03 +0200 Subject: [PATCH 2/5] fix: handle non zero exit --- cog.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cog.sh b/cog.sh index 504ad4e..9ef732c 100755 --- a/cog.sh +++ b/cog.sh @@ -22,6 +22,9 @@ fi echo "Running command: cog $COMMAND $ARGS" stdout="$(cog $COMMAND $ARGS 2>&1)" +if [ $? -ne 0 ]; then + exit 1 +fi echo $stdout echo "stdout<> "$GITHUB_OUTPUT" echo "$stdout" >> "$GITHUB_OUTPUT" From 2c128bfbdf5cb9b5ba08d3dde8e9e5cb1c4fe278 Mon Sep 17 00:00:00 2001 From: Paul Delafosse Date: Sat, 18 Oct 2025 15:09:53 +0200 Subject: [PATCH 3/5] test: assert action fail on non zero exit --- .github/workflows/ci.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 25d8a33..bd596cd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,6 +35,16 @@ jobs: - run: echo "${{ steps.cog-changelog.outputs.stdout }}" + - uses: ./cocogitto-action + id: invalid-step + with: + command: invalid + continue-on-error: true + + - name: Assert action errored + if: steps.invalid-step.outcome == 'failure' + run: echo "Action errored as expected" + test-container: runs-on: ubuntu-latest container: @@ -65,3 +75,13 @@ jobs: command: changelog - run: echo "${{ steps.cog-changelog.outputs.stdout }}" + + - uses: ./cocogitto-action + id: invalid-step + with: + command: invalid + continue-on-error: true + + - name: Assert action errored + if: steps.invalid-step.outcome == 'failure' + run: echo "Action errored as expected" From 6fa49d732cc9cdf611f129e784f4b44f93aa0c04 Mon Sep 17 00:00:00 2001 From: Paul Delafosse Date: Sat, 18 Oct 2025 15:13:37 +0200 Subject: [PATCH 4/5] test: add multiarch test matrix --- .github/workflows/ci.yaml | 18 +++++++++++++++++- install.sh | 5 +++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bd596cd..cc12e54 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,23 @@ on: jobs: test: - runs-on: ubuntu-latest + strategy: + matrix: + include: + - os: macos-latest + target: x86_64-apple-darwin + - os: macos-latest + target: aarch64-apple-darwin + - os: ubuntu-latest + target: x86_64-unknown-linux-musl + - os: windows-latest + target: x86_64-pc-windows-msvc + - os: ubuntu-latest + target: armv7-unknown-linux-musleabihf + - os: ubuntu-latest + target: aarch64-unknown-linux-gnu + + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/install.sh b/install.sh index f0ce61f..186f1d6 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,3 @@ - #!/bin/sh CUR_DIR=$(pwd) @@ -8,11 +7,12 @@ BIN_DIR="$HOME/.local/bin" PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m) + case $PLATFORM in linux|darwin|mingw*) case $ARCH in x86_64|amd64) ARCH="x86_64" ;; - aarch64) ARCH="aarch64" ;; + aarch64|arm64) ARCH="aarch64" ;; armv7l) ARCH="armv7" ;; *) echo "Unsupported architecture: $ARCH"; exit 1 ;; esac @@ -35,6 +35,7 @@ case $PLATFORM in esac TAR="cocogitto-$VERSION-$ARCH-$PLATFORM.tar.gz" +echo "Downloading cocogitto version $VERSION for $ARCH-$PLATFORM from https://github.com/cocogitto/cocogitto/releases/download/$VERSION/$TAR" mkdir -p "$BIN_DIR" cd "$BIN_DIR" || exit From dfb0339fc8b63b62249be55a6af8065c55f1d800 Mon Sep 17 00:00:00 2001 From: Paul Delafosse Date: Sat, 18 Oct 2025 15:51:11 +0200 Subject: [PATCH 5/5] feat: update cocogitto to 6.4.0 --- install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 186f1d6..518b9ce 100755 --- a/install.sh +++ b/install.sh @@ -1,13 +1,12 @@ #!/bin/sh CUR_DIR=$(pwd) -VERSION=6.3.0 +VERSION=6.4.0 BIN_DIR="$HOME/.local/bin" PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m) - case $PLATFORM in linux|darwin|mingw*) case $ARCH in @@ -40,5 +39,9 @@ echo "Downloading cocogitto version $VERSION for $ARCH-$PLATFORM from https://gi mkdir -p "$BIN_DIR" cd "$BIN_DIR" || exit curl -OL https://github.com/cocogitto/cocogitto/releases/download/"$VERSION"/"$TAR" -tar --strip-components=1 -xzf $TAR "$ARCH-$PLATFORM/cog" +if [ "$PLATFORM" = "pc-windows-msvc" ]; then + tar --strip-components=1 -xzf $TAR "$ARCH-$PLATFORM/cog.exe" +else + tar --strip-components=1 -xzf $TAR "$ARCH-$PLATFORM/cog" +fi cd "$CUR_DIR" || exit