Skip to content

Commit

Permalink
Add github action to build the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tadhunt authored and EtienneDx committed Sep 13, 2023
1 parent 5317620 commit aa6e750
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build

on:
workflow_dispatch:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: 'Checkout source code'
uses: actions/checkout@v4
- name: 'Set up JDK'
uses: actions/setup-java@v3
with:
java-version: '16'
distribution: 'adopt'

- name: 'Cache dependencies'
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: 'Build, test, and package'
run: mvn -B package --file pom.xml

- name: 'Get artifact version'
id: pomVersion
run: |
VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout )
echo "::set-output name=version::$VERSION"
- name: 'Upload artifact'
uses: actions/upload-artifact@v3
with:
name: RealEstate-${{ steps.pomVersion.outputs.version }}.jar
path: target/RealEstate-${{ steps.pomVersion.outputs.version }}.jar

0 comments on commit aa6e750

Please sign in to comment.