From fed97afec0352ce88d06586ce6b1f892aaf2a316 Mon Sep 17 00:00:00 2001 From: Jack Hamer <47187316+JackHamer09@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:27:19 +0300 Subject: [PATCH] fix: prod deployments with proper env variables (#138) --- .github/workflows/production.yml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 0748962ee..b976b5480 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -7,29 +7,39 @@ name: Deploy Package to Production description: "A release version to deploy, e.g. v1.0.0" required: true default: "v1.0.0" + jobs: - deploy: - name: Deploy + build_and_deploy: + name: Build and Deploy runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 + ref: refs/tags/${{ github.event.inputs.version }} - - name: Download Dist package - uses: dsaltares/fetch-gh-release-asset@master + - name: Setup Node.js + uses: actions/setup-node@v3 with: - version: "tags/${{ github.event.inputs.version }}" - file: "dist.zip" - target: "dist.zip" - token: ${{ secrets.GITHUB_TOKEN }} + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: | + npm ci --force + + - name: Setup .env + run: | + echo "WALLET_CONNECT_PROJECT_ID=${{ secrets.WALLET_CONNECT_PROJECT_ID }}" > .env + echo "ANKR_TOKEN=${{ secrets.ANKR_TOKEN }}" >> .env - - name: Unzip Dist package + - name: Build run: | - unzip dist.zip + npm run generate - - uses: matter-labs/action-hosting-deploy@main + - name: Deploy to Production + uses: matter-labs/action-hosting-deploy@main with: repoToken: "${{ secrets.GITHUB_TOKEN }}" firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ZKSYNC_DAPP_WALLET_V2 }}"