From bf81bb49eb76b492212911ad92f8dd42b573e283 Mon Sep 17 00:00:00 2001 From: Nikita Sychev Date: Wed, 13 Nov 2024 22:55:41 +0500 Subject: [PATCH] Add CI --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ README.md | 4 +--- settings.gradle.kts | 4 ++++ 3 files changed, 48 insertions(+), 3 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..a755725 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Build +on: + push: + branches: [master] + pull_request: + branches: [master] +jobs: + build: + timeout-minutes: 20 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 9.12.3 + - uses: actions/setup-node@v4 + with: + node-version: '20.18.0' + cache: 'pnpm' + cache-dependency-path: 'frontend/pnpm-lock.yaml' + + - name: Install dependencies + working-directory: ./frontend + run: pnpm install + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build with gradle + run: ./gradlew shadowJar + + - uses: actions/upload-artifact@v4 + with: + name: balloons.jar + path: build/libs/balloons-*.jar + retention-days: 14 + compression-level: 0 diff --git a/README.md b/README.md index 82843fd..434aa72 100644 --- a/README.md +++ b/README.md @@ -71,9 +71,7 @@ gradle shadowJar ## TODO -- [ ] Frontend: fix space between links -- [ ] Build under newer Javas -- [ ] CI +- [ ] Frontend: detect connection errors - [ ] Tests - [ ] Some docs on how to develop it - [ ] Automate JWT secret generation diff --git a/settings.gradle.kts b/settings.gradle.kts index 8d6ee2f..19c448c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,7 @@ +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" +} + rootProject.name = "balloons" include(":frontend") \ No newline at end of file