From 26504e5b1d93c23898404c051c95a2aaa489f593 Mon Sep 17 00:00:00 2001 From: Andrew Gable Date: Wed, 11 Sep 2024 16:49:29 -0600 Subject: [PATCH] Merge pull request #49028 from Expensify/cmartins-fixGetPreviousRelease Fix getPreviousRelease and artifacts (cherry picked from commit f3498e2bf2048789a1ed308fbb1d331b4125fea4) (CP triggered by luacmartins) --- .../getDeployPullRequestList.ts | 2 +- .../javascript/getDeployPullRequestList/index.js | 2 +- .github/workflows/deploy.yml | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts b/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts index b07d29a587be..2c854b37eb20 100644 --- a/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts +++ b/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts @@ -46,7 +46,7 @@ async function run() { } // If it's anywhere else in this page, the the prior release is the next item in the page - if (indexOfCurrentRelease > 0) { + if (indexOfCurrentRelease >= 0) { priorTag = filteredData.at(indexOfCurrentRelease + 1)?.tag_name; done(); } diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index 0346df720b8e..918d631778d3 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -11535,7 +11535,7 @@ async function run() { return filteredData; } // If it's anywhere else in this page, the the prior release is the next item in the page - if (indexOfCurrentRelease > 0) { + if (indexOfCurrentRelease >= 0) { priorTag = filteredData.at(indexOfCurrentRelease + 1)?.tag_name; done(); } diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 536fef1bf220..a2abe4810041 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -196,13 +196,13 @@ jobs: - name: Upload desktop sourcemaps artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.SHOULD_DEPLOY_PRODUCTION && 'desktop-sourcemaps-artifact' || 'desktop-staging-sourcemaps-artifact' }} + name: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'desktop-sourcemaps-artifact' || 'desktop-staging-sourcemaps-artifact' }} path: ./desktop/dist/www/merged-source-map.js.map - name: Upload desktop build artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.SHOULD_DEPLOY_PRODUCTION && 'desktop-build-artifact' || 'desktop-staging-build-artifact' }} + name: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'desktop-build-artifact' || 'desktop-staging-build-artifact' }} path: ./desktop-build/NewExpensify.dmg iOS: @@ -407,7 +407,7 @@ jobs: - name: Upload web sourcemaps artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.SHOULD_DEPLOY_PRODUCTION && 'web' || 'web-staging' }}-sourcemaps-artifact + name: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'web' || 'web-staging' }}-sourcemaps-artifact path: ./dist/merged-source-map.js.map - name: Compress web build .tar.gz and .zip @@ -418,13 +418,13 @@ jobs: - name: Upload .tar.gz web build artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.SHOULD_DEPLOY_PRODUCTION && 'web' || 'web-staging' }}-build-tar-gz-artifact + name: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'web' || 'web-staging' }}-build-tar-gz-artifact path: ./webBuild.tar.gz - name: Upload .zip web build artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.SHOULD_DEPLOY_PRODUCTION && 'web' || 'web-staging' }}-build-zip-artifact + name: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'web' || 'web-staging' }}-build-zip-artifact path: ./webBuild.zip postSlackMessageOnFailure: