diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index af8c6131487a..a39145689b84 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -794,22 +794,28 @@ jobs: mv ./desktop-staging-sourcemaps-artifact/merged-source-map.js.map ./desktop-staging-sourcemaps-artifact/desktop-staging-merged-source-map.js.map mv ./web-staging-sourcemaps-artifact/merged-source-map.js.map ./web-staging-sourcemaps-artifact/web-staging-merged-source-map.js.map - # Release asset name should follow the template: [platform]-[hybrid, staging, production or blank]-[sourcemap or blank].[file extension] - name: Upload artifacts to GitHub Release continue-on-error: true run: | - gh release upload ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} --clobber \ - ./android-sourcemaps-artifact/index.android.bundle.map#android-sourcemap.js.map \ - ./android-aab-artifact/app-production-release.aab#android.aab \ - ./android-hybrid-build-artifact/Expensify-release.aab#android-hybrid.aab \ - ./desktop-staging-sourcemaps-artifact/desktop-staging-merged-source-map.js.map#desktop-staging-sourcemap.js.map \ - ./desktop-staging-build-artifact/NewExpensify.dmg#desktop-staging-.dmg \ - ./ios-sourcemaps-artifact/main.jsbundle.map#ios-sourcemap.js.map \ - ./ios-build-artifact/New\ Expensify.ipa#ios.ipa \ - ./ios-hybrid-build-artifact/Expensify.ipa#ios-hybrid.ipa \ - ./web-staging-sourcemaps-artifact/web-staging-sourcemap.js.map#web-staging-sourcemap.js.map \ - ./web-staging-build-tar-gz-artifact/webBuild.tar.gz#web-staging.tar.gz \ - ./web-staging-build-zip-artifact/webBuild.zip#web-staging.zip + # Release asset name should follow the template: [platform]-[hybrid, staging, production or blank]-[sourcemap or blank].[file extension] + files=( + "./android-sourcemaps-artifact/index.android.bundle.map#android-sourcemap.js.map" + "./android-aab-artifact/app-production-release.aab#android.aab" + "./android-hybrid-build-artifact/Expensify-release.aab#android-hybrid.aab" + "./desktop-staging-sourcemaps-artifact/desktop-staging-merged-source-map.js.map#desktop-staging-sourcemap.js.map" + "./desktop-staging-build-artifact/NewExpensify.dmg#desktop-staging.dmg" + "./ios-sourcemaps-artifact/main.jsbundle.map#ios-sourcemap.js.map" + "./ios-build-artifact/New Expensify.ipa#ios.ipa" + "./ios-hybrid-build-artifact/Expensify.ipa#ios-hybrid.ipa" + "./web-staging-sourcemaps-artifact/web-staging-sourcemap.js.map#web-staging-sourcemap.js.map" + "./web-staging-build-tar-gz-artifact/webBuild.tar.gz#web-staging.tar.gz" + "./web-staging-build-zip-artifact/webBuild.zip#web-staging.zip" + ) + + # Loop through each file and upload individually (so if one fails, we still have other platforms uploaded) + for file_entry in "${files[@]}"; do + gh release upload "$APP_VERSION" --repo "$GITHUB_REPOSITORY" --clobber "$file_entry" + done env: GITHUB_TOKEN: ${{ github.token }} @@ -853,16 +859,22 @@ jobs: mv ./desktop-sourcemaps-artifact/merged-source-map.js.map ./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map mv ./web-sourcemaps-artifact/merged-source-map.js.map ./web-sourcemaps-artifact/web-merged-source-map.js.map - # Release asset name should follow the template: [platform]-[hybrid, staging, production or blank]-[sourcemap or blank].[file extension] - name: Upload artifacts to GitHub Release continue-on-error: true run: | - gh release upload ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} --clobber \ - ./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map#desktop-production-sourcemap.js.map \ - ./desktop-build-artifact/NewExpensify.dmg#desktop-production.dmg \ - ./web-sourcemaps-artifact/web-merged-source-map.js.map#web-production-sourcemap.js.map \ - ./web-build-tar-gz-artifact/webBuild.tar.gz#web-production.tar.gz \ - ./web-build-zip-artifact/webBuild.zip#web-production.zip + # Release asset name should follow the template: [platform]-[hybrid, staging, production or blank]-[sourcemap or blank].[file extension] + files=( + "./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map#desktop-production-sourcemap.js.map" + "./desktop-build-artifact/NewExpensify.dmg#desktop-production.dmg" + "./web-sourcemaps-artifact/web-merged-source-map.js.map#web-production-sourcemap.js.map" + "./web-build-tar-gz-artifact/webBuild.tar.gz#web-production.tar.gz" + "./web-build-zip-artifact/webBuild.zip#web-production.zip" + ) + + # Loop through each file and upload individually (so if one fails, we still have other platforms uploaded) + for file_entry in "${files[@]}"; do + gh release upload "$APP_VERSION" --repo "$GITHUB_REPOSITORY" --clobber "$file_entry" + done env: GITHUB_TOKEN: ${{ github.token }}