From 6ebbd00cfd36e8704a812514a10668c6ed04a51d Mon Sep 17 00:00:00 2001 From: bannikovilea Date: Tue, 26 Oct 2021 02:30:55 +0500 Subject: [PATCH 1/2] Add ci maven config --- .github/workflows/main.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..391d196 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,17 @@ +name: Java CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Maven + run: mvn --batch-mode --update-snapshots verify \ No newline at end of file From cf61071056a2e125f1b08a1343e64a36039b82e4 Mon Sep 17 00:00:00 2001 From: bannikovilea Date: Tue, 26 Oct 2021 03:04:43 +0500 Subject: [PATCH 2/2] Pack artifacts --- .github/workflows/main.yaml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 391d196..71b2e6c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -3,7 +3,7 @@ name: Java CI on: [push] jobs: - build: + tests: runs-on: ubuntu-latest steps: @@ -14,4 +14,22 @@ jobs: java-version: '11' distribution: 'adopt' - name: Build with Maven - run: mvn --batch-mode --update-snapshots verify \ No newline at end of file + run: mvn --batch-mode --update-snapshots verify + + pack-artifacts: + runs-on: ubuntu-latest + needs: tests + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Maven + run: mvn --batch-mode --update-snapshots verify + - uses: actions/upload-artifact@v2 + with: + name: artifacts + path: ${{ github.workspace }}/*/target/*.jar \ No newline at end of file