mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
Added tar/gz compression as tgz files.
This commit is contained in:
25
.github/workflows/NightlyRelease.yml
vendored
25
.github/workflows/NightlyRelease.yml
vendored
@@ -108,6 +108,8 @@ jobs:
|
||||
- name: 📑 (Re)create (new) Release Page
|
||||
id: createReleasePage
|
||||
run: |
|
||||
set +e
|
||||
|
||||
ANSI_LIGHT_RED="\e[91m"
|
||||
ANSI_LIGHT_GREEN="\e[92m"
|
||||
ANSI_NOCOLOR="\e[0m"
|
||||
@@ -156,6 +158,8 @@ jobs:
|
||||
- name: 📥 Download artifacts and upload as assets
|
||||
id: uploadAssets
|
||||
run: |
|
||||
set +e
|
||||
|
||||
ANSI_LIGHT_RED="\e[91m"
|
||||
ANSI_LIGHT_GREEN="\e[92m"
|
||||
ANSI_LIGHT_YELLOW="\e[93m"
|
||||
@@ -212,7 +216,7 @@ jobs:
|
||||
asset="${asset##*!}"
|
||||
echo " Compressing artifact '${artifact}' to '${asset}' ..."
|
||||
cd "${artifact}"
|
||||
zip -v -r "../${asset}" *
|
||||
zip -r "../${asset}" *
|
||||
cd -
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
|
||||
@@ -224,6 +228,23 @@ jobs:
|
||||
ERRORS=1
|
||||
continue
|
||||
fi
|
||||
elif [[ "${asset}" == !*tgz ]]; then
|
||||
echo -e "${ANSI_LIGHT_GREEN}[TAR/GZ]${ANSI_NOCOLOR}"
|
||||
asset="${asset##*!}"
|
||||
echo " Compressing artifact '${artifact}' to '${asset}' ..."
|
||||
cd "${artifact}"
|
||||
tar -czf "../${asset}" *
|
||||
cd -
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
|
||||
uploadFile="${asset}"
|
||||
else
|
||||
echo -e " Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
|
||||
echo "Couldn't compress '${artifact}' to tgz file '${asset}'."
|
||||
echo "::error title=ZipError::Couldn't compress '${artifact}' to tgz file '${asset}'."
|
||||
ERRORS=1
|
||||
continue
|
||||
fi
|
||||
elif [[ -e "${artifact}/${asset}" ]]; then
|
||||
echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
|
||||
uploadFile="${artifact}/${asset}"
|
||||
@@ -248,7 +269,7 @@ jobs:
|
||||
fi
|
||||
done <<<"${{ inputs.assets }}"
|
||||
|
||||
echo "Inspecting downlaoded artifacts ..."
|
||||
echo "Inspecting downloaded artifacts ..."
|
||||
tree .
|
||||
|
||||
if [[ $ERROR -ne 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user