This repository has been archived by the owner on May 2, 2024. It is now read-only.
Build #309
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: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: use node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: cache gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: install ui dependencies | |
working-directory: ./ui | |
run: npm ci | |
- name: build ui | |
working-directory: ./ui | |
run: | | |
npm run update-version | |
npm run build | |
- name: build application JAR | |
run: ./gradlew assemble withPostgres | |
- name: release artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: retroquest | |
path: api/build/libs/retroquest.jar | |
- name: cleanup gradle cache | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties |