@@ -46,27 +46,29 @@ jobs:
4646 # Remove old files if they exist
4747 rm -f "$ARCHIVE" "$CHECKSUM" "$SIGNATURE"
4848
49- # Create tar.gz archive in PAX format without using a pipe
50- tar --format=pax --exclude="$ARCHIVE " -czf "$ARCHIVE" .
49+ # Create tar.gz archive in PAX format, excluding temporary directory
50+ tar --format=pax --exclude="tmp_archive " -czf "$ARCHIVE" .
5151
5252 # Generate SHA256 checksum
5353 sha256sum "$ARCHIVE" | awk '{print $1}' > "$CHECKSUM"
5454
55- # Write SIGNIFY_KEY secret to a temporary file
55+ # Write SIGNIFY_KEY secret to a temporary file (never added to repo)
5656 printf "%s\n" "$SIGNIFY_KEY" > "$TMP_DIR/archive.sec"
5757 chmod 600 "$TMP_DIR/archive.sec"
5858
5959 # Sign the archive
6060 signify-openbsd -S -s "$TMP_DIR/archive.sec" -m "$ARCHIVE"
6161
62- # Copy archive files to the repo's archive directory
63- rsync -av --exclude="archive.sec" --delete "$TMP_DIR/" "$ARCHIVE_DIR/"
62+ # Copy only the archive, checksum, and signature to the repo's archive directory
63+ cp "$ARCHIVE" "$ARCHIVE_DIR/"
64+ cp "$CHECKSUM" "$ARCHIVE_DIR/"
65+ cp "$SIGNATURE" "$ARCHIVE_DIR/"
6466
6567 - name : Commit and Push Changes via GitHub CLI
6668 run : |
6769 set -e
6870
69- # Setup git to use GitHub CLI credentials (no gh auth login needed)
71+ # Setup git to use GitHub CLI credentials
7072 gh auth setup-git
7173 git config user.name "github-actions[bot]"
7274 git config user.email "github-actions[bot]@users.noreply.github.com"
8183 git push origin "$BRANCH"
8284 else
8385 echo "No changes to commit."
84- fi
0 commit comments