Skip to content

Commit d08bd03

Browse files
committed
fix manual dispatch trigger... yet again
1 parent c2c2375 commit d08bd03

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,44 +75,34 @@ jobs:
7575
- name: Prepare package
7676
shell: bash
7777
run: |
78-
# Define the final package name from the matrix
7978
PACKAGE_NAME="lstr-${{ matrix.asset_name_suffix }}"
79+
STAGING_DIR="staging"
80+
81+
mkdir "$STAGING_DIR"
8082
81-
# Create a temporary staging directory to hold the assets
82-
mkdir staging
83-
84-
# Copy the correct binary into the staging directory
8583
if [[ "${{ runner.os }}" == "Windows" ]]; then
86-
cp target/${{ matrix.target }}/release/lstr.exe staging/
84+
cp "target/${{ matrix.target }}/release/lstr.exe" "$STAGING_DIR/"
8785
else
88-
cp target/${{ matrix.target }}/release/lstr staging/
86+
cp "target/${{ matrix.target }}/release/lstr" "$STAGING_DIR/"
8987
fi
9088
91-
# Copy documentation into the staging directory
92-
cp README.md staging/
93-
cp LICENSE staging/
94-
95-
# --- Start of Debugging ---
89+
cp README.md "$STAGING_DIR/"
90+
cp LICENSE "$STAGING_DIR/"
91+
9692
echo "--- Contents of staging directory ---"
97-
ls -R staging
98-
# --- End of Debugging ---
93+
ls -R "$STAGING_DIR"
9994
100-
# Create the final archive from the contents of the staging directory
10195
if [[ "${{ runner.os }}" == "Windows" ]]; then
102-
# For zip, archive the files inside the staging directory
103-
7z a "$PACKAGE_NAME" ./staging/*
96+
7z a "$PACKAGE_NAME" "./$STAGING_DIR/*"
10497
else
105-
# For tar.gz, change directory to staging and archive its contents
106-
tar -czf "../$PACKAGE_NAME" .
98+
# Corrected tar command: Create archive in the current directory
99+
tar -czf "$PACKAGE_NAME" -C "$STAGING_DIR" .
107100
fi
108101
109-
# --- Start of Debugging ---
110102
echo "--- Contents of workspace after archiving ---"
111-
ls -R
103+
ls -R .
112104
echo "ASSET will be set to: $PACKAGE_NAME"
113-
# --- End of Debugging ---
114-
115-
# Set the asset name for the next step
105+
116106
echo "ASSET=$PACKAGE_NAME" >> $GITHUB_ENV
117107
118108
- name: Upload Release Asset

0 commit comments

Comments
 (0)