Skip to content

Commit 57ae894

Browse files
authored
Cosign fix (#413)
1 parent caa2864 commit 57ae894

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

.github/workflows/post-merge.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,21 +454,34 @@ jobs:
454454
# Convert array to JSON safely for GitHub Actions
455455
binaries_json=$(printf '%s\n' "${binaries[@]}" | jq -R -s -c 'split("\n") | map(select(length > 0))')
456456
457-
# Write to GITHUB_OUTPUT without extra spaces or quotes
457+
# Write to GITHUB_OUTPUT
458458
echo "binaries=${binaries_json}" >> "$GITHUB_OUTPUT"
459459
fi
460460
461461
- name: Upload binaries (if any)
462+
if: ${{ steps.find-binaries.outputs.binaries != '[]' && steps.find-binaries.outputs.binaries != '[""]' }}
463+
run: |
464+
binaries=$(echo '${{ steps.find-binaries.outputs.binaries }}' | jq -r '.[]')
465+
if [ -z "$binaries" ]; then
466+
echo "No binaries to upload."
467+
exit 0
468+
fi
469+
TEMP_DIR=$(mktemp -d)
470+
echo "Copying binaries to temporary folder: $TEMP_DIR"
471+
for bin in $binaries; do
472+
mkdir -p "$TEMP_DIR/$(dirname "$bin")"
473+
cp -a "$bin" "$TEMP_DIR/$bin"
474+
done
475+
echo "All binaries copied to $TEMP_DIR"
476+
echo "TEMP_DIR=$TEMP_DIR" >> "$GITHUB_ENV"
477+
478+
- name: Upload binaries artifact
462479
if: ${{ steps.find-binaries.outputs.binaries != '[]' && steps.find-binaries.outputs.binaries != '[""]' }}
463480
uses: actions/upload-artifact@v5
464481
with:
465482
name: built-binaries
466-
path: |
467-
${{ inputs.project_folder }}/out/**
468-
${{ inputs.project_folder }}/build/**
469-
${{ inputs.project_folder }}/bin/**
483+
path: ${{ env.TEMP_DIR }}
470484
if-no-files-found: ignore
471-
strip-components: 1
472485

473486
- name: Lint Code
474487
if: ${{ inputs.run_lint }}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.64-dev
1+
0.1.64

0 commit comments

Comments
 (0)