File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,22 @@ jobs:
2929 - name : Yarn install and Cache dependencies
3030 uses : graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1
3131
32+ - name : Set version
33+ id : set-version
34+ run : |
35+ VERSION_REPO_DISPATCH=${{ github.event.client_payload.tag }}
36+ VERSION_REF=${{ github.ref_name }}
37+ VERSION_COMMIT=${{ github.sha }}
38+ echo "VERSION=${VERSION_REPO_DISPATCH:-${VERSION_REF:-${VERSION_COMMIT:-"undefined"}}}" >> "$GITHUB_OUTPUT"
39+
3240 - name : Yarn build
3341 # Set environment variables required to perform the build. These are only available to this step
3442 env :
3543 VITE_API_HOST : ${{ vars.API_HOST }}
3644 VITE_GRAASP_APP_KEY : ${{ secrets.APP_KEY }}
3745 VITE_SENTRY_ENV : ${{ vars.SENTRY_ENV }}
3846 VITE_SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
39- VITE_VERSION : ${{ github.event.client_payload.tag }}
47+ VITE_VERSION : ${{ steps.set-version.outputs.VERSION }}
4048 VITE_WS_HOST : ${{ vars.WS_HOST }}
4149 # add any env variable needed by your app here
4250 run : yarn build
Original file line number Diff line number Diff line change @@ -29,14 +29,22 @@ jobs:
2929 - name : Yarn install and Cache dependencies
3030 uses : graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1
3131
32+ - name : Set version
33+ id : set-version
34+ run : |
35+ VERSION_REPO_DISPATCH=${{ github.event.client_payload.tag }}
36+ VERSION_REF=${{ github.ref_name }}
37+ VERSION_COMMIT=${{ github.sha }}
38+ echo "VERSION=${VERSION_REPO_DISPATCH:-${VERSION_REF:-${VERSION_COMMIT:-"undefined"}}}" >> "$GITHUB_OUTPUT"
39+
3240 - name : Yarn build
3341 # Set environment variables required to perform the build. These are only available to this step
3442 env :
3543 VITE_API_HOST : ${{ vars.API_HOST }}
3644 VITE_GRAASP_APP_KEY : ${{ secrets.APP_KEY }}
3745 VITE_SENTRY_ENV : ${{ vars.SENTRY_ENV }}
3846 VITE_SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
39- VITE_VERSION : ${{ github.event.client_payload.tag }}
47+ VITE_VERSION : ${{ steps.set-version.outputs.VERSION }}
4048 VITE_WS_HOST : ${{ vars.WS_HOST }}
4149 # add any env variable needed by your app here
4250 run : yarn build
You can’t perform that action at this time.
0 commit comments