Compare commits

..

7 Commits

Author SHA1 Message Date
Baptiste Augrain
b0154c7831 fix: add debug log (#915) 2021-11-10 11:52:44 +01:00
Baptiste Augrain
23313d41ba fix: correctly read exit status (#914) 2021-11-10 10:40:20 +01:00
Baptiste Augrain
cf48030b59 fix: deleting bad assets (#913) 2021-11-10 10:13:12 +01:00
Baptiste Augrain
848aabfe54 fix: fixing release script (#912) 2021-11-10 09:36:35 +01:00
Baptiste Augrain
10a0cb4b30 fix: remove infinity loop in the release script (#904) 2021-11-06 12:58:53 +01:00
Baptiste Augrain
0469329683 fix: fixing release script (#903) 2021-11-06 12:26:36 +01:00
Baptiste Augrain
6acd2fbfe1 feat: break force the uploads (#902) 2021-11-06 12:03:44 +01:00
4 changed files with 40 additions and 7 deletions

View File

@@ -88,7 +88,7 @@ jobs:
- name: Release
env:
GH_CLI_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'

View File

@@ -95,7 +95,7 @@ jobs:
- name: Release
env:
GH_CLI_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'

View File

@@ -82,7 +82,7 @@ jobs:
- name: Release
env:
GH_CLI_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'

View File

@@ -2,12 +2,12 @@
set -e
if [[ -z "${GH_CLI_TOKEN}" ]]; then
echo "Will not release because no GH_CLI_TOKEN defined"
if [[ -z "${GITHUB_TOKEN}" ]]; then
echo "Will not release because no GITHUB_TOKEN defined"
exit
fi
echo "${GH_CLI_TOKEN}" | gh auth login --with-token
npm install -g github-release-cli
if [[ $( gh release view "${MS_TAG}" 2>&1 ) =~ "release not found" ]]; then
echo "Creating release '${MS_TAG}'"
@@ -16,11 +16,44 @@ fi
cd artifacts
set +e
for FILE in *
do
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
echo "Uploading '${FILE}'"
echo "Uploading '${FILE}' at $( date "+%T" )"
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$?
echo "exit: $EXIT_STATUS"
if ! (( $EXIT_STATUS )); then
for (( i=0; i<10; i++ ))
do
github-release delete --owner VSCodium --repo vscodium --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
sleep $(( 15 * (i + 1)))
echo "RE-Uploading '${FILE}' at $( date "+%T" )"
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$?
echo "exit: $EXIT_STATUS"
if ! (( $EXIT_STATUS )); then
break
fi
done
echo "exit: $EXIT_STATUS"
if (( $EXIT_STATUS )); then
echo "'${FILE}' hasn't been uploaded!"
github-release delete --owner VSCodium --repo vscodium --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
exit 1
fi
fi
fi
done