From 2aaa4e75437ea23d285bd1d998303b5a048cb0e6 Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Mon, 7 Oct 2024 18:32:39 -0300 Subject: [PATCH] ci: add zip action to build and zip client --- .github/workflows/pr.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 42ec23b..9af3ee2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -66,10 +66,33 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + client-zip: + name: Build Client and Zip it + runs-on: ubuntu-latest + needs: client-code-checks + env: + VITE_BUILD: client:${{ github.event.number }} + VITE_BACKEND_SERVER: ${{ secrets.SERVER_ADDRESS }}/server + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + name: Set up Node + with: + node-version: '20' + - name: Clean and Install + run: cd client && npm ci --ignore-scripts --no-update-notifier --omit=dev + - name: Build + run: cd client && npm run build && rm -rf node_modules + - uses: vimtor/action-zip@v1.2 + name: Zip it + with: + files: dist/ + dest: client_${{ github.event.number }}.zip + client-docker-build: name: Build Client Docker image runs-on: ubuntu-latest - needs: client-code-checks + needs: client-zip steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3