Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5 upgrading #15

Merged
merged 14 commits into from
Jan 13, 2025
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Package

on:
push:
branches:
- main
- svelte-5-upgrading

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
browser_name: [ chrome, firefox ]

steps:
# Step 1: Checkout the repository
- name: Checkout Code
uses: actions/checkout@v3

# Step 2: Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22.13.0 # Use a version compatible with your dependencies
cache: 'npm'

# Step 3: Install dependencies
- name: Install Dependencies
run: npm install

# Step 4: Build for the current environment
- name: Build for ${{ matrix.browser_name }}
env:
VITE_BROWSER_NAME: ${{ matrix.browser_name }}
VITE_API_KEY: ${{ secrets.VITE_API_KEY }}
run: npm run build

# Step 5: Package the build and set output
- name: Package Build
id: package
run: |
VERSION=$(node -p "require('./package.json').version")
OUTPUT_NAME="yst_v${VERSION}_${{ matrix.browser_name }}.zip"
echo "output_name=${OUTPUT_NAME}" >> $GITHUB_ENV
cd dist
zip -r "../${OUTPUT_NAME}" .
shell: bash

# Step 6: Upload artifacts
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.output_name }}
path: yst_v*.zip
Loading
Loading