Skip to content

Commit

Permalink
ci: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
andreszorro committed Mar 6, 2024
1 parent 4195980 commit 1374a3a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- run: bun install
- name: Create binary and release files
run: |
mkdir ./dist/${{ matrix.name }}
mkdir -p ./dist/${{ matrix.name }}
bun build ./lib/main.ts --compile --outfile ./dist/${{ matrix.name }}/scfz
# FIXME: Bun issue with bin path
./lib/scfz --version
Expand Down
33 changes: 33 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euxo pipefail

RELEASE_DIR="dist/releases"
SCFZ_VERSION="$(git tag --list | tail -n 1)"

export RELEASE_DIR SCFZ_VERSION

rm -rf "${RELEASE_DIR:?}/$SCFZ_VERSION"
mkdir -p "$RELEASE_DIR/$SCFZ_VERSION"
mkdir -p "dist/bin"
touch "dist/bin/scfz"

find dist -name 'tarball-*' -exec sh -c '
target=${1#dist/tarball-}
cp "dist/tarball-$target/"*.txt "$RELEASE_DIR/$SCFZ_VERSION"
' sh {} \;

platforms=(
linux-x64
linux-arm64
linux-armv6
linux-armv7
macos-x64
macos-arm64
)
for platform in "${platforms[@]}"; do
cp "$RELEASE_DIR/$SCFZ_VERSION/scfz-$platform.txt" "$RELEASE_DIR/$SCFZ_VERSION/scfz-$SCFZ_VERSION-$platform.txt"
cp "$RELEASE_DIR/$SCFZ_VERSION/scfz-$SCFZ_VERSION-$platform.txt" "$RELEASE_DIR/scfz-latest-$platform.txt"
tar -xvzf "$RELEASE_DIR/$SCFZ_VERSION/scfz-$SCFZ_VERSION-$platform.txt"
cp -v dist/bin/scfz "$RELEASE_DIR/scfz-latest-$platform"
cp -v dist/bin/scfz "$RELEASE_DIR/$SCFZ_VERSION/scfz-$SCFZ_VERSION-$platform"
done

0 comments on commit 1374a3a

Please sign in to comment.