Skip to content

Commit 0f76e2c

Browse files
author
Ryan
committed
rename artifacts to avoid conflicts [skip ci]
1 parent e2b4bf4 commit 0f76e2c

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

.github/workflows/release.yml

+29-1
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,40 @@ jobs:
7777
branch: main
7878
path: artifacts/linux-arm64
7979

80+
- name: Rename artifacts
81+
run: |
82+
mkdir -p renamed-artifacts
83+
84+
# Function to get file extension
85+
get_extension() {
86+
filename="$1"
87+
echo "${filename##*.}"
88+
}
89+
90+
# Process each artifact directory
91+
for dir in artifacts/*; do
92+
if [ -d "$dir" ]; then
93+
platform_arch=$(basename "$dir")
94+
platform=${platform_arch%-*}
95+
arch=${platform_arch#*-}
96+
97+
# Find the first file in the directory (should only be one)
98+
for file in "$dir"/*; do
99+
if [ -f "$file" ]; then
100+
ext=$(get_extension "$file")
101+
new_name="vigil-${platform}-${arch}-${{ github.event.inputs.version }}.${ext}"
102+
cp "$file" "renamed-artifacts/$new_name"
103+
fi
104+
done
105+
fi
106+
done
107+
80108
- name: Upload Release Assets
81109
uses: softprops/action-gh-release@v1
82110
with:
83111
tag_name: ${{ github.event.inputs.version }}
84112
files: |
85-
artifacts/**/*
113+
renamed-artifacts/*
86114
draft: true
87115
env:
88116
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)