fix(workflow): add shell: bash to steps using bashisms (parameter expansion, [[ ) and ensure make uses bash via SHELL=; prevents /bin/sh syntax errors in release CI
This commit is contained in:
parent
e49ad4a23d
commit
6537f3ffe1
@ -35,6 +35,7 @@ jobs:
|
||||
run: go mod download
|
||||
|
||||
- name: Build for multiple platforms
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
COMMIT=$(git rev-parse --short HEAD)
|
||||
@ -45,6 +46,7 @@ jobs:
|
||||
|
||||
|
||||
- name: Prepare assets
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
for bin in build/gostations-* ; do
|
||||
@ -60,7 +62,8 @@ jobs:
|
||||
|
||||
# Clean raw binaries (we ship the tarballs)
|
||||
for plat in 'linux/amd64' 'linux/arm64' 'darwin/amd64' 'darwin/arm64' 'windows/amd64'; do
|
||||
IFS='/' read -r OS ARCH <<< "$plat"
|
||||
OS=$(echo "$plat" | cut -d/ -f1)
|
||||
ARCH=$(echo "$plat" | cut -d/ -f2)
|
||||
BIN="gostations-${OS}-${ARCH}"
|
||||
if [ "$OS" = "windows" ]; then BIN="${BIN}.exe"; fi
|
||||
rm -f "build/${BIN}"
|
||||
@ -70,6 +73,7 @@ jobs:
|
||||
run: apt update && apt install -y jq
|
||||
|
||||
- name: Create Release & Upload Assets
|
||||
shell: bash
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
run: |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user