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

Allow users to specify the build environment when manually triggering the workflow. #171

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ name: Build and Zip Extension

on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to build the extension for'
required: true
default: 'development'
type: choice
options:
- production
- staging
- development

defaults:
run:
Expand Down Expand Up @@ -40,16 +50,13 @@ jobs:
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

# Set EXTENSION_ENV variable to the current branch name
- name: Set EXTENSION_ENV variable
run: echo "EXTENSION_ENV=${GITHUB_REF##refs/heads/}" | sed 's/\//-/g' >> $GITHUB_ENV
- name: Build artifacts
run: pnpm build
env:
EXTENSION_ENV: ${{ env.EXTENSION_ENV }}
EXTENSION_ENV: ${{ inputs.environment }}

- name: Upload extension artifacts
uses: actions/upload-artifact@v4
with:
name: mocksi-lite-next
path: ./apps/mocksi-lite-next/dist
path: ./apps/mocksi-lite-next/dist
Loading