chore(deps-dev): bump supabase from 1.226.4 to 2.0.0 #47
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
- name: Check Bun version | |
run: bun --version | |
- name: Check TypeScript version | |
run: bunx tsc --version | |
- name: Format code | |
run: bun run format | |
- name: Lint code | |
run: bun run lint | |
- name: Type check | |
run: bunx tsc --noEmit | |
- name: Create dist directory | |
run: mkdir -p dist | |
- name: Build | |
run: bunx tsc | |
- name: Check dist directory | |
run: ls -R dist || echo "dist directory not found or empty" | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- name: Run tests | |
run: bun test | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: .env | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- name: Check downloaded artifacts | |
run: ls -R dist || echo "dist directory not found or empty after download" | |
- name: Check if secrets are set | |
run: | | |
echo "TOKEN is set: ${{ secrets.TOKEN != '' }}" | |
echo "CLIENT_ID is set: ${{ secrets.CLIENT_ID != '' }}" | |
echo "GUILD_ID is set: ${{ secrets.GUILD_ID != '' }}" | |
echo "ACCESS is set: ${{ secrets.ACCESS != '' }}" | |
echo "SUPABASE_URL is set: ${{ secrets.SUPABASE_URL != '' }}" | |
echo "SUPABASE_ANON is set: ${{ secrets.SUPABASE_ANON != '' }}" | |
echo "CANVAS_DOMAIN is set: ${{ secrets.CANVAS_DOMAIN != '' }}" | |
echo "CANVAS_DOMAIN is set: ${{ secrets.ENCRYPTION_KEY != '' }}" | |
- name: Deploy to production | |
run: bun run deploy | |
env: | |
TOKEN: ${{ secrets.TOKEN }} | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
GUILD_ID: ${{ secrets.GUILD_ID }} | |
ACCESS: ${{ secrets.ACCESS }} | |
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
SUPABASE_ANON: ${{ secrets.SUPABASE_ANON }} | |
CANVAS_DOMAIN: ${{ secrets.CANVAS_DOMAIN }} | |
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }} | |
commitlint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install commitlint | |
run: bun add -d @commitlint/cli @commitlint/config-conventional | |
- name: Print versions | |
run: | | |
git --version | |
bun --version | |
bunx commitlint --version | |
- name: Validate current commit (last commit) with commitlint | |
if: github.event_name == 'push' | |
run: bunx commitlint --from HEAD~1 --to HEAD --verbose | |
- name: Validate PR commits with commitlint | |
if: github.event_name == 'pull_request' | |
run: bunx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose |