Skip to content

Commit

Permalink
ci: add build action and run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Shtian committed Mar 19, 2024
1 parent 926ef8b commit 12dc5b4
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 34 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-dots-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'authenticlash': patch
---

Add changeset for handling versioning and vercel deployments triggered from version tags
22 changes: 22 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI
on:
push:
branches:
- '**'
env:
CI: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'

- run: pnpm i
- run: pnpm run lint && pnpm run build
15 changes: 12 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Release

on:
push:
branches:
- main
workflow_run:
workflows: [CI]
branches: [main]
types: [completed]

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write

env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store

jobs:
release:
name: Release
Expand All @@ -33,5 +40,7 @@ jobs:

- name: Create Release Pull Request
uses: changesets/action@v1
with:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"test:integration": "playwright test",
"test:unit": "vitest"
"test:unit": "vitest",
"release": "pnpm build && changeset publish"
},
"devDependencies": {
"@playwright/test": "^1.28.1",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/toast/Toast.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Portal from '../Portal.svelte';
import { toast } from '$lib/stores/ToastStore';
import VisuallyHidden from '../VisuallyHidden.svelte';
import { AlertTriangle, CheckCircle2, Info, MessageCircleWarning, X } from 'lucide-svelte';
import { AlertTriangle, CheckCircle2, Info, X } from 'lucide-svelte';
import { fly, fade } from 'svelte/transition';
import { flip } from 'svelte/animate';
import ToastMessage from '$lib/components/toast/ToastMessage.svelte';
Expand Down
3 changes: 1 addition & 2 deletions src/lib/components/ui/button/button-shadcn.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<script lang="ts">
import { Button as ButtonPrimitive } from 'bits-ui';
import { cn } from '$lib/utils';
import { buttonVariants, type Props, type Events } from '.';
import { buttonVariants, type Props } from '.';
type $$Props = Props;
type $$Events = Events;
let className: $$Props['class'] = undefined;
export let variant: $$Props['variant'] = 'default';
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/ui/calendar/calendar-day.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import { cn } from '$lib/utils';
type $$Props = CalendarPrimitive.DayProps;
type $$Events = CalendarPrimitive.DayEvents;
export let date: $$Props['date'];
export let month: $$Props['month'];
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/ui/calendar/calendar-next-button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { cn } from '$lib/utils';
type $$Props = CalendarPrimitive.NextButtonProps;
type $$Events = CalendarPrimitive.NextButtonEvents;
let className: $$Props['class'] = undefined;
export { className as class };
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/ui/calendar/calendar-prev-button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { cn } from '$lib/utils';
type $$Props = CalendarPrimitive.PrevButtonProps;
type $$Events = CalendarPrimitive.PrevButtonEvents;
let className: $$Props['class'] = undefined;
export { className as class };
Expand Down
2 changes: 0 additions & 2 deletions src/lib/components/ui/calendar/calendar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
type $$Props = CalendarPrimitive.Props;
type $$Events = CalendarPrimitive.Events;
export let value: $$Props['value'] = undefined;
export let placeholder: $$Props['placeholder'] = undefined;
export let weekdayFormat: $$Props['weekdayFormat'] = 'short';
Expand Down
4 changes: 2 additions & 2 deletions src/routes/account/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
export let data;
export let form;
let { session, supabase, profile } = data;
$: ({ session, supabase, profile } = data);
let { session, profile } = data;
$: ({ session, profile } = data);
let profileForm: HTMLFormElement;
let loading = false;
Expand Down
3 changes: 2 additions & 1 deletion src/routes/auth/login/AuthProviders.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import googleLogo from '$lib/assets/google_logo.svg';
import githubLogo from '$lib/assets/github_logo.svg';
/* eslint-disable @typescript-eslint/no-explicit-any */
export let supabase: SupabaseClient<any, 'public', any>;
type OAuthProvider = 'github' | 'discord' | 'google';
Expand All @@ -20,7 +21,7 @@
}
: {};
const { data, error } = await supabase.auth.signInWithOAuth({ provider, options });
const { error } = await supabase.auth.signInWithOAuth({ provider, options });
if (error) {
toast.send({ message: `Error logging in with ${provider}: ${error.message}`, type: 'error' });
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/games/[code]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
{#if timeLeft > 0}
<form method="POST" action="?/updateScore" use:enhance={handleNewScore}>
<p>
{!!data.currentPlayer
{data.currentPlayer
? 'Register new 2FA Code'
: 'Choose your nickname and enter your 2FA code to join the game!'}
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/games/[code]/GameHighScore.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { flip } from 'svelte/animate';
import * as Popover from '$lib/components/ui/popover';
import ScoreGraph from '$lib/components/ScoreGraph.svelte';
/* eslint-disable @typescript-eslint/no-explicit-any */
export let players: {
id: any;
score: any;
Expand Down
34 changes: 17 additions & 17 deletions static/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "AuthentiClash",
"short_name": "AuthentiClash",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#020817",
"background_color": "#020817",
"display": "standalone"
"name": "AuthentiClash",
"short_name": "AuthentiClash",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#020817",
"background_color": "#020817",
"display": "standalone"
}

0 comments on commit 12dc5b4

Please sign in to comment.