mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-17 13:36: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
|
- name: 📑 (Re)create (new) Release Page
|
||||||
id: createReleasePage
|
id: createReleasePage
|
||||||
run: |
|
run: |
|
||||||
|
set +e
|
||||||
|
|
||||||
ANSI_LIGHT_RED="\e[91m"
|
ANSI_LIGHT_RED="\e[91m"
|
||||||
ANSI_LIGHT_GREEN="\e[92m"
|
ANSI_LIGHT_GREEN="\e[92m"
|
||||||
ANSI_NOCOLOR="\e[0m"
|
ANSI_NOCOLOR="\e[0m"
|
||||||
@@ -156,6 +158,8 @@ jobs:
|
|||||||
- name: 📥 Download artifacts and upload as assets
|
- name: 📥 Download artifacts and upload as assets
|
||||||
id: uploadAssets
|
id: uploadAssets
|
||||||
run: |
|
run: |
|
||||||
|
set +e
|
||||||
|
|
||||||
ANSI_LIGHT_RED="\e[91m"
|
ANSI_LIGHT_RED="\e[91m"
|
||||||
ANSI_LIGHT_GREEN="\e[92m"
|
ANSI_LIGHT_GREEN="\e[92m"
|
||||||
ANSI_LIGHT_YELLOW="\e[93m"
|
ANSI_LIGHT_YELLOW="\e[93m"
|
||||||
@@ -212,7 +216,7 @@ jobs:
|
|||||||
asset="${asset##*!}"
|
asset="${asset##*!}"
|
||||||
echo " Compressing artifact '${artifact}' to '${asset}' ..."
|
echo " Compressing artifact '${artifact}' to '${asset}' ..."
|
||||||
cd "${artifact}"
|
cd "${artifact}"
|
||||||
zip -v -r "../${asset}" *
|
zip -r "../${asset}" *
|
||||||
cd -
|
cd -
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
|
echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
|
||||||
@@ -224,6 +228,23 @@ jobs:
|
|||||||
ERRORS=1
|
ERRORS=1
|
||||||
continue
|
continue
|
||||||
fi
|
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
|
elif [[ -e "${artifact}/${asset}" ]]; then
|
||||||
echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
|
echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
|
||||||
uploadFile="${artifact}/${asset}"
|
uploadFile="${artifact}/${asset}"
|
||||||
@@ -248,7 +269,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done <<<"${{ inputs.assets }}"
|
done <<<"${{ inputs.assets }}"
|
||||||
|
|
||||||
echo "Inspecting downlaoded artifacts ..."
|
echo "Inspecting downloaded artifacts ..."
|
||||||
tree .
|
tree .
|
||||||
|
|
||||||
if [[ $ERROR -ne 0 ]]; then
|
if [[ $ERROR -ne 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user