Skip to content

Commit

Permalink
added build step to bundle chrome package as artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ahnaf committed Feb 7, 2025
1 parent ce39c3f commit e5bf119
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build-chrome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Bundle chrome packages

on:
push:
branches:
- main
- develop
paths-ignore:
- '**/*.md'
- '**/*.json'
env:
NODE_VERSION: '20.x'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Setup Node.js version
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies using npm workspaces
run: npm install

- name: Generate build number
run: echo "BUILD_NUMBER=${{ github.run_number }}" >> $GITHUB_ENV

- name: Create .env file for client
run: |
echo "VITE_APP_TITLE=${{ secrets.VITE_APP_TITLE }}" >> ./client/.env
echo "VITE_APP_SLOGAN=${{ secrets.VITE_APP_SLOGAN }}" >> ./client/.env
echo "VITE_BACKEND_ENDPOINT=${{ secrets.VITE_BACKEND_PROD_ENDPOINT }}" >> ./client/.env
echo "VITE_ENVIRONMENT=chrome" >> ./client/.env
echo "VITE_MOCK_CALENDER=${{ secrets.VITE_MOCK_CALENDER }}" >> ./client/.env
echo "VITE_BUILD_NUMBER=${BUILD_NUMBER}" >> ./client/.env
- name: Build all dependencies
run: npm run build

- name: Build chrome dependencies
run: npm run build:chrome

- name: Zip chrome build
run: |
cd client/build_chrome
zip -r ../../build_chrome.zip .
cd ../..
- name: Upload chrome build artifact
uses: actions/upload-artifact@v4
with:
name: chrome-extension
path: build_chrome.zip
retention-days: 7
3 changes: 2 additions & 1 deletion client/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ VITE_APP_TITLE=Quick Meet
VITE_APP_SLOGAN=One click to book them all
VITE_BACKEND_ENDPOINT=http://localhost:3001
VITE_ENVIRONMENT=web
VITE_MOCK_CALENDER=true
VITE_MOCK_CALENDER=true
VITE_BUILD_NUMBER=100
3 changes: 2 additions & 1 deletion client/generate-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ config();
const hostPermission = `${process.env.VITE_BACKEND_ENDPOINT}/*`;
const appDescription = process.env.VITE_APP_SLOGAN;
const appTitle = process.env.VITE_APP_TITLE;
const buildNumber = process.env.VITE_BUILD_NUMBER || 0;

const manifest = {
name: appTitle,
version: '1.0.4',
version: `1.1.${buildNumber}`,
description: appDescription,
manifest_version: 3,
key: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAstDgQFGfJrfxo3id/1KTHVZpKbsCRMKZJXDUsDT8JRfasB/CeDGmuVs1hFYBJcGgn9PbK/mnE9hzWERVFpa4sfGZ3o0lvyfPLUfJd7PmfZ/4PQvE4+GfVQPAz/p4OVtP1WtbN4DED3jmrXiSrZ72paioz/ydVOSRDfo8m3+s9K92LcraYXHItvs+rSKXgfKxflfGzByme/fVO2V4yvE6T0YOqdLDc2USF4KGx0llHvqnmtB2K+rLr3V1/UcM1b4fP6kCiZAo7K2Tngpqa8DxgLVp8GYZ7NPPFJqu4tG1G1iRjtwk8Qblqmw+jmH+qZ2WguGtFpxU7P2JD8znPu//OwIDAQAB',
Expand Down
Binary file modified client/public/logo_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e5bf119

Please sign in to comment.