Skip to content

Commit ec1eaac

Browse files
authored
Merge pull request #72 from JasonTheAdams/patch-1
Always include slug directory in zip
2 parents 85f6dac + 9d0be1f commit ec1eaac

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

deploy.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,12 @@ svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-int
157157

158158
if $INPUT_GENERATE_ZIP; then
159159
echo "Generating zip file..."
160-
cd "$SVN_DIR/trunk" || exit
161-
zip -r "${GITHUB_WORKSPACE}/${SLUG}.zip" .
160+
161+
# use a symbolic link so the directory in the zip matches the slug
162+
ln -s "${SVN_DIR}/trunk" "${SVN_DIR}/${SLUG}"
163+
zip -r "${GITHUB_WORKSPACE}/${SLUG}.zip" "$SLUG"
164+
unlink "${SVN_DIR}/${SLUG}"
165+
162166
echo "zip-path=${GITHUB_WORKSPACE}/${SLUG}.zip" >> "${GITHUB_OUTPUT}"
163167
echo "✓ Zip file generated!"
164168
fi

0 commit comments

Comments
 (0)