Skip to content

Commit 00f24fe

Browse files
helenJasonTheAdams
authored andcommitted
Try zip path output
1 parent 66c9cf3 commit 00f24fe

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ inputs:
88
generate-zip:
99
description: 'Generate package zip file?'
1010
default: false
11+
outputs:
12+
zip-path:
13+
description: 'Path to zip file'
14+
value: ${{ steps.id.outputs.zip-path }}
1115
runs:
1216
using: 'composite'
1317
steps:

deploy.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,16 @@ svn status
123123
echo "➤ Committing files..."
124124
svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
125125

126-
if ! $INPUT_GENERATE_ZIP; then
126+
if $INPUT_GENERATE_ZIP; then
127127
echo "Generating zip file..."
128+
129+
# use a symbolic link so the directory in the zip matches the slug
130+
ln -s "${SVN_DIR}/trunk" "{$SVN_DIR}/${SLUG}"
128131
mv "${SVN_DIR}/trunk" "${SVN_DIR}/${SLUG}"
129-
cd $SVN_DIR
130132
zip -r "${GITHUB_WORKSPACE}/${SLUG}.zip" $SLUG
133+
unlink "{$SVN_DIR}/${SLUG}"
134+
135+
echo "::set-output name=zip-path::$(echo ${GITHUB_WORKSPACE}/${SLUG}.zip)"
131136
echo "✓ Zip file generated!"
132137
fi
133138

0 commit comments

Comments
 (0)