source $HOME/.bashrc #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Zip Extension | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
- dev | |
push: | |
branches: | |
- main | |
- dev | |
tags: | |
- v* | |
jobs: | |
build: | |
name: Build | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Change directory to "extension" | |
run: cd extension | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Bun | |
run: | | |
curl -fsSL https://bun.sh/install | bash | |
export BUN_INSTALL="$HOME/.bun" | |
export PATH="$BUN_INSTALL/bin:$PATH" | |
echo 'export BUN_INSTALL="$HOME/.bun"' >> $HOME/.bashrc | |
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> $HOME/.bashrc | |
source $HOME/.bashrc | |
- name: Install dependencies | |
run: bun install --cwd extension # Install dependencies in "extension" directory | |
- name: Build | |
run: bun run build --cwd extension # Build from the "extension" directory | |
- name: Upload extension artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vite-web-extension | |
path: extension/dist # Specify the correct path to the build artifacts |