Skip to content

Commit 0d94ad5

Browse files
committed
Name release binary with OS and architecture
1 parent 61b0de9 commit 0d94ad5

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/release.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,42 @@ jobs:
3131
run: |
3232
cargo build --release
3333
34+
- name: Prepare binary
35+
id: prepare
36+
run: |
37+
case "${{ runner.os }}" in
38+
Linux)
39+
OS="linux"
40+
;;
41+
Windows)
42+
OS="windows"
43+
;;
44+
macOS)
45+
OS="macos"
46+
;;
47+
*)
48+
OS="${{ runner.os }}"
49+
;;
50+
esac
51+
52+
case "${{ runner.arch }}" in
53+
X64)
54+
ARCH="x86_64"
55+
;;
56+
*)
57+
ARCH="${{ runner.arch }}"
58+
;;
59+
esac
60+
61+
# Rename the file using the full tag name
62+
TARGET="technique-${{ github.ref_name }}-${OS}-${ARCH}"
63+
64+
mv target/release/technique "${TARGET}"
65+
66+
echo "binary=${TARGET}" >> $GITHUB_OUTPUT
67+
3468
- name: Upload binary to Release
3569
uses: softprops/action-gh-release@v2
3670
with:
3771
tag_name: ${{ github.ref_name }}
38-
files: target/release/technique
72+
files: ${{ steps.prepare.outputs.binary }}

0 commit comments

Comments
 (0)