From 368d9d24daa25830c717d54d50873995053635e9 Mon Sep 17 00:00:00 2001 From: Pascal Bourque <pascal@cosmos.moi> Date: Wed, 30 Oct 2024 10:46:18 -0400 Subject: [PATCH] Combine build outputs and store as artifact --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34755c4..eb6953c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,3 +63,32 @@ jobs: # --force is required for now, as NextJS references a React version that is not yet published. - run: npm ci --force - run: npm run build + + # Upload artifacts for this locale + - uses: actions/upload-artifact@v4 + with: + name: build-output-${{ matrix.build-locale }} + path: ./out/${{ matrix.build-locale }} + retention-days: 1 + + combine-builds: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Create combined directory + run: mkdir -p ./dist + + # Download all locale builds + - uses: actions/download-artifact@v4 + with: + pattern: build-output-* + path: ./out + merge-multiple: true + + # Upload combined artifacts + - uses: actions/upload-artifact@v4 + with: + name: combined-build-output + path: ./dist + retention-days: 1