readme #14
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 | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: 1.1.26 | |
- name: Update manifest.json | |
working-directory: ./extension | |
run: | | |
sed -i 's|"api_url": ".*"|"api_url": "${{ secrets.API_URL }}"|' manifest.json | |
sed -i 's|"api_key": ".*"|"api_key": "${{ secrets.API_KEY }}"|' manifest.json | |
- name: Install dependencies | |
working-directory: ./extension | |
run: bun install | |
- name: Build | |
working-directory: ./extension | |
run: bun run build | |
- name: Upload extension artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ourcourseville-chrome-extension | |
path: extension/dist |