File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
.github/actions/upload-artifact-wheel Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 9
9
if : github.event_name == 'push'
10
10
id : vars
11
11
run : |
12
- echo "ASSET_PATH=$(find ./dist -mindepth 1 -print -quit)" >> $GITHUB_ENV
13
- cd dist
14
- echo "ASSET_NAME=$(printf '%s\0' * | awk 'BEGIN{RS="\0"} {print; exit}')" >> $GITHUB_ENV
12
+ if [ ! -d "./dist" ]; then
13
+ echo "Error: dist directory not found"
14
+ exit 1
15
+ fi
16
+ ASSET_PATH=$(find ./dist -name "*.whl" -printf "%T@ %p\n" | sort -n | tail -1 | cut -f2- -d" ")
17
+ if [ -z "$ASSET_PATH" ]; then
18
+ echo "Error: No .whl files found in dist directory"
19
+ exit 1
20
+ fi
21
+ echo "ASSET_PATH=$ASSET_PATH" >> $GITHUB_ENV
22
+ echo "ASSET_NAME=$(basename "$ASSET_PATH")" >> $GITHUB_ENV
15
23
16
24
- name : Upload wheel artifact
17
25
if : github.event_name == 'push'
You can’t perform that action at this time.
0 commit comments