mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-12 00:37:19 +10:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0154c7831 | ||
|
|
23313d41ba | ||
|
|
cf48030b59 | ||
|
|
848aabfe54 |
2
.github/workflows/linux.yml
vendored
2
.github/workflows/linux.yml
vendored
@@ -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'
|
||||
|
||||
|
||||
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
@@ -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'
|
||||
|
||||
|
||||
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@@ -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'
|
||||
|
||||
|
||||
30
release.sh
30
release.sh
@@ -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}'"
|
||||
@@ -21,24 +21,36 @@ 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"
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
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}'"
|
||||
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256" --clobber
|
||||
echo "RE-Uploading '${FILE}' at $( date "+%T" )"
|
||||
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||
|
||||
if [[ $? == 0 ]]; then
|
||||
EXIT_STATUS=$?
|
||||
echo "exit: $EXIT_STATUS"
|
||||
|
||||
if ! (( $EXIT_STATUS )); then
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo "exit: $EXIT_STATUS"
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user