Commit 0f76e2c Ryan
committed
1 parent e2b4bf4 commit 0f76e2c Copy full SHA for 0f76e2c
File tree 1 file changed +29
-1
lines changed
1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,40 @@ jobs:
77
77
branch : main
78
78
path : artifacts/linux-arm64
79
79
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
+
80
108
- name : Upload Release Assets
81
109
uses : softprops/action-gh-release@v1
82
110
with :
83
111
tag_name : ${{ github.event.inputs.version }}
84
112
files : |
85
- artifacts/** /*
113
+ renamed- artifacts/*
86
114
draft : true
87
115
env :
88
116
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments