44 lines
916 B
YAML
44 lines
916 B
YAML
name: SharePulse Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
build-jar:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'adopt'
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 'node' # Use latest version
|
|
npm-version: 'latest'
|
|
|
|
- name: Build frontend
|
|
run: |
|
|
cd frontend
|
|
npm install
|
|
npm run build
|
|
cd ..
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x ./gradlew
|
|
|
|
- name: Build .jar with Gradle
|
|
run: ./gradlew clean bootJar
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: jar-artifact
|
|
path: build/libs/*.jar |