diff --git a/.github/workflows/mvn.yml b/.github/workflows/mvn.yml index da7ce25..565149e 100644 --- a/.github/workflows/mvn.yml +++ b/.github/workflows/mvn.yml @@ -1,5 +1,5 @@ --- -name: mvn +name: Build & Test on: push: branches: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7b2553c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +--- +name: "Release" +on: + push: + tags: + - 'v*' + +jobs: + tagged-release: + name: "Tagged Release" + runs-on: {{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-latest"] + java: [17] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-jdk-${{ matrix.java }}-maven- + - run: java -version + - run: mvn -version + - run: mvn --errors --batch-mode clean package -DskipTests=true + - run: mv target/*-jar-with-dependencies.jar target/logic-checker.jar + - uses: ncipollo/release-action@v1 + with: + artifacts: "release.tar.gz,target/logic-checker.jar" \ No newline at end of file