Skip to content

Commit 50dc82a

Browse files
committed
build info was supplied
1 parent 76b9b3d commit 50dc82a

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,32 @@ jobs:
3030
run: |
3131
pwd
3232
if [[ -f "target/release/singen" ]]; then
33-
cp target/release/singen .
33+
cp -v target/release/singen .
3434
elif [[ -f "target/release/singen.exe" ]]; then
35-
cp target/release/singen .
35+
cp -v target/release/singen .
3636
else
3737
echo "No binary to copy for this OS."
3838
fi
3939
40+
- name: Get Build Info
41+
id: build-info
42+
shell: bash
43+
run: |
44+
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
45+
ARCH=$(uname -m)
46+
TARGET=""
47+
case "$OS" in
48+
linux) TARGET="$ARCH-unknown-linux-gnu" ;;
49+
darwin) TARGET="$ARCH-apple-darwin" ;;
50+
msys*|cygwin*|mingw*) TARGET="$ARCH-pc-windows-msvc" ;;
51+
esac
52+
VERSION=$(grep '^version = ' Cargo.toml | sed -E 's/version = "(.*)"/\1/')
53+
FILENAME="rapidrecast-v${VERSION}-${TARGET}"
54+
echo "OS=$OS" >> "$GITHUB_ENV"
55+
echo "ARCH=$ARCH" >> "$GITHUB_ENV"
56+
echo "TARGET=$TARGET" >> "$GITHUB_ENV"
57+
echo "FILENAME=$FILENAME" >> "$GITHUB_ENV"
58+
4059
- name: Compress tar.gz
4160
uses: ksm2/archive-action@v1
4261
with:

0 commit comments

Comments
 (0)