diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..aecb106 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build +on: [ pull_request, push, workflow_dispatch ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Java 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: temurin + cache: gradle + + - name: make gradle wrapper executable + run: chmod +x ./gradlew + + - name: build + env: + PUBLISH_SUFFIX: snapshots + MAVEN_USER: ${{ secrets.MAVEN_USER }} + MAVEN_PASS: ${{ secrets.MAVEN_PASS }} + run: ./gradlew buildOrPublish + + - name: capture build artifacts + uses: actions/upload-artifact@v2 + with: + name: Artifact-${{ github.sha }} + path: build/libs/ diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml deleted file mode 100644 index 62c201c..0000000 --- a/.github/workflows/gradle-publish.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: build -on: [ pull_request, push ] - -jobs: - build: - strategy: - matrix: - java: [ 17 ] - runs-on: ubuntu-latest - env: - PUBLISH_SUFFIX: snapshots - MAVEN_USER: ${{ secrets.MAVEN_USER }} - MAVEN_PASS: ${{ secrets.MAVEN_PASS }} - steps: - - name: checkout repository - uses: actions/checkout@v2 - - - name: setup jdk ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - - name: make gradle wrapper executable - run: chmod +x ./gradlew - - - name: build - run: ./gradlew buildOrPublish - - - name: capture build artifacts - uses: actions/upload-artifact@v2 - with: - name: Artifact-${{ github.sha }} - path: build/libs/