Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Build and Zip Extension #69

Build and Zip Extension

Build and Zip Extension #69

Workflow file for this run

name: Build and Zip Extension
on:
workflow_dispatch:
inputs:
environment:
description: "Extension build target"
required: true
default: "QA"
type: choice
options:
- QA
- production
- staging
- development
defaults:
run:
working-directory: ./apps/mocksi-lite-next
jobs:
build_extension:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build artifacts
run: pnpm build --mode=${{ inputs.environment }}
- name: Store commit short sha
shell: bash
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV
- name: Upload extension artifacts
uses: actions/upload-artifact@v4
with:
name: mocksi-lite-${{ inputs.environment }}-${{ env.SHORT_SHA }}
path: ./apps/mocksi-lite-next/dist