From 5d608da4cedc6868123f41863756612cab946a4d Mon Sep 17 00:00:00 2001 From: encode42 Date: Sun, 28 Apr 2024 14:53:42 -0400 Subject: [PATCH] Create GitHub build workflow --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ src/database.ts | 10 +++++----- 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..956425c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: Build + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Build + run: | + bun build.ts + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: chiron + path: build/* diff --git a/src/database.ts b/src/database.ts index e1fcc89..1a8b723 100644 --- a/src/database.ts +++ b/src/database.ts @@ -7,11 +7,11 @@ const database = new Database("db.sqlite", { database.exec("PRAGMA journal_mode = WAL;"); database .query(` - CREATE TABLE IF NOT EXISTS known_projects ( - id CHARACTER(8) PRIMARY KEY, - last_seen DATETIME DEFAULT CURRENT_TIMESTAMP - ); -`) + CREATE TABLE IF NOT EXISTS known_projects ( + id CHARACTER(8) PRIMARY KEY, + last_seen DATETIME DEFAULT CURRENT_TIMESTAMP + ); + `) .run(); const query = {