mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-06 04:50:03 -06:00
chore(ci): use electron-forge hook for gathering artifacts
This commit is contained in:
46
.github/actions/build-electron/action.yml
vendored
46
.github/actions/build-electron/action.yml
vendored
@@ -158,49 +158,3 @@ runs:
|
||||
echo "Found ZIP: $zip_file"
|
||||
echo "Note: ZIP files are not code signed, but their contents should be"
|
||||
fi
|
||||
|
||||
- name: Prepare artifacts
|
||||
shell: cmd
|
||||
run: |
|
||||
mkdir -p upload
|
||||
|
||||
if [ "${{ inputs.os }}" = "macos" ]; then
|
||||
# For macOS, we need to look in specific directories based on the maker
|
||||
echo "Collecting macOS artifacts..."
|
||||
|
||||
# Look for DMG files recursively
|
||||
echo "Looking for DMG files..."
|
||||
dmg_file=$(find ./dist -name "*.dmg" -print -quit)
|
||||
if [ -n "$dmg_file" ]; then
|
||||
echo "Found DMG: $dmg_file"
|
||||
cp "$dmg_file" "upload/TriliumNextNotes-${{ github.ref_name }}-macos-${{ inputs.arch }}.dmg"
|
||||
else
|
||||
echo "Warning: No DMG file found"
|
||||
fi
|
||||
|
||||
# Look for ZIP files recursively
|
||||
echo "Looking for ZIP files..."
|
||||
zip_file=$(find ./dist -name "*.zip" -print -quit)
|
||||
if [ -n "$zip_file" ]; then
|
||||
echo "Found ZIP: $zip_file"
|
||||
cp "$zip_file" "upload/TriliumNextNotes-${{ github.ref_name }}-macos-${{ inputs.arch }}.zip"
|
||||
else
|
||||
echo "Warning: No ZIP file found"
|
||||
fi
|
||||
else
|
||||
# For other platforms, use the existing logic but with better error handling
|
||||
echo "Collecting artifacts for ${{ inputs.os }}..."
|
||||
for ext in ${{ inputs.extension }}; do
|
||||
echo "Looking for .$ext files..."
|
||||
file=$(find ./dist -name "*.$ext" -print -quit)
|
||||
if [ -n "$file" ]; then
|
||||
echo "Found $file for extension $ext"
|
||||
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.$ext"
|
||||
else
|
||||
echo "Warning: No file found with extension .$ext"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Final contents of upload directory:"
|
||||
ls -la upload/
|
||||
|
||||
Reference in New Issue
Block a user