Bugfix: reload project after adding dataset #139
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }} | |
- name: Make sure to append 'SNAPSHOT' to version if 'push' happened on 'main' | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
run: | | |
mvn versions:set -DremoveSnapshot | |
mvn help:evaluate -N -Dexpression=project.version|grep -v '\[' | |
VERSION=$(mvn help:evaluate -N -Dexpression=project.version|grep -v '\[') | |
mvn versions:set -DnewVersion=$VERSION-SNAPSHOT | |
- name: Append branch name to version if 'push' did not happen on 'main' or a tag | |
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')}} | |
run: | | |
mvn versions:set -DremoveSnapshot | |
mvn help:evaluate -N -Dexpression=project.version|grep -v '\[' | |
VERSION=$(mvn help:evaluate -N -Dexpression=project.version|grep -v '\[') | |
mvn versions:set -DnewVersion=$VERSION-${GITHUB_REF##*/} | |
- name: Package with Maven | |
run: mvn -B package --file pom.xml | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jars | |
retention-days: 2 | |
path: | | |
target/*.jar | |
!target/*-with-dependencies.jar |