From f12de4ea238c057d436c11e864ffbbefc9a7809b Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Thu, 1 May 2025 15:23:58 +0300 Subject: [PATCH] fix releasing alias --- .github/workflows/release.yml | 7 +++---- scripts/githubActions.mjs | 5 +++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28c1e34c..3cda1011 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,9 +29,6 @@ jobs: run: pnpx zardoy-release empty --skip-github --output-file assets/release.json env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Get releasing alias - run: node scripts/githubActions.mjs getReleasingAlias - id: alias - name: Download Generated Sounds map run: node scripts/downloadSoundsMap.mjs - run: vercel build --token=${{ secrets.VERCEL_TOKEN }} --prod @@ -48,8 +45,10 @@ jobs: with: run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --prod id: deploy + - name: Get releasing alias + run: node scripts/githubActions.mjs getReleasingAlias + id: alias - name: Set deployment alias - if: ${{ steps.alias.outputs.alias != '' && steps.alias.outputs.alias != 'mcraft.fun' && steps.alias.outputs.alias != 's.mcraft.fun' }} run: | for alias in $(echo ${{ steps.alias.outputs.alias }} | tr "," "\n"); do vercel alias set ${{ steps.deploy.outputs.stdout }} $alias --token=${{ secrets.VERCEL_TOKEN }} --scope=zaro diff --git a/scripts/githubActions.mjs b/scripts/githubActions.mjs index 3864d6c2..3e8eb0f6 100644 --- a/scripts/githubActions.mjs +++ b/scripts/githubActions.mjs @@ -22,9 +22,10 @@ const fns = { const tag = releaseJson.latestTag const [major, minor, patch] = tag.replace('v', '').split('.') if (major === '0' && minor === '1') { - return final(`v${patch}`) + setOutput('alias', final(`v${patch}`)) + } else { + setOutput('alias', final(tag)) } - return final(tag) } }