@@ -66,9 +66,26 @@ svn update --set-depth infinity assets
6666svn update --set-depth infinity trunk
6767svn update --set-depth immediates tags
6868
69+ generate_zip () {
70+ if $INPUT_GENERATE_ZIP ; then
71+ echo " Generating zip file..."
72+
73+ # use a symbolic link so the directory in the zip matches the slug
74+ ln -s " ${SVN_DIR} /trunk" " ${SVN_DIR} /${SLUG} "
75+ zip -r " ${GITHUB_WORKSPACE} /${SLUG} .zip" " $SLUG "
76+ unlink " ${SVN_DIR} /${SLUG} "
77+
78+ echo " zip-path=${GITHUB_WORKSPACE} /${SLUG} .zip" >> " ${GITHUB_OUTPUT} "
79+ echo " ✓ Zip file generated!"
80+ fi
81+ }
82+
6983# Bail early if the plugin version is already published.
7084if [[ -d " tags/$VERSION " ]]; then
7185 echo " ℹ︎ Version $VERSION of plugin $SLUG was already published" ;
86+
87+ generate_zip
88+
7289 exit
7390fi
7491
@@ -173,16 +190,6 @@ else
173190 svn commit -m " Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username " $SVN_USERNAME " --password " $SVN_PASSWORD "
174191fi
175192
176- if $INPUT_GENERATE_ZIP ; then
177- echo " Generating zip file..."
178-
179- # use a symbolic link so the directory in the zip matches the slug
180- ln -s " ${SVN_DIR} /trunk" " ${SVN_DIR} /${SLUG} "
181- zip -r " ${GITHUB_WORKSPACE} /${SLUG} .zip" " $SLUG "
182- unlink " ${SVN_DIR} /${SLUG} "
183-
184- echo " zip-path=${GITHUB_WORKSPACE} /${SLUG} .zip" >> " ${GITHUB_OUTPUT} "
185- echo " ✓ Zip file generated!"
186- fi
193+ generate_zip
187194
188195echo " ✓ Plugin deployed!"
0 commit comments