From 850b00a1c740e783b19ab8f2cce1fafb8d43b29c Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Wed, 2 Jun 2021 18:28:23 +1000 Subject: [PATCH] simplify gh actions, add dependabot and release drafter Signed-off-by: olivier lamy --- .github/dependabot.yml | 10 ++++ .github/release-drafter.yml | 2 + .github/workflows/jdkbuilds.yml | 46 ---------------- .github/workflows/main.yml | 77 --------------------------- .github/workflows/maven.yml | 54 +++++++++++++++++++ .github/workflows/release-drafter.yml | 12 +++++ 6 files changed, 78 insertions(+), 123 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/release-drafter.yml delete mode 100644 .github/workflows/jdkbuilds.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/maven.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..b76b89570 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 000000000..931515868 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,2 @@ +_extends: .github +tag-template: versions-maven-plugin-$NEXT_MINOR_VERSION diff --git a/.github/workflows/jdkbuilds.yml b/.github/workflows/jdkbuilds.yml deleted file mode 100644 index c18c0b8f4..000000000 --- a/.github/workflows/jdkbuilds.yml +++ /dev/null @@ -1,46 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -name: JDKBuilds - -on: - push: - branches: - - master - - '*' - pull_request: - branches: - - '*' - -jobs: - openjdk: - strategy: - matrix: - jdk: [8-slim, 11-slim, 15, 16] - name: "OpenJDK ${{ matrix.jdk }}" - runs-on: ubuntu-latest - container: "maven:3.6.3-openjdk-${{ matrix.jdk }}" - steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ matrix.jdk }}- - - name: 'Build' - run: mvn -B -V --no-transfer-progress -Prun-its clean verify --fail-at-end diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 4dc76947a..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,77 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -name: Main -on: - push: - branches: - - master - - '*' - pull_request: - branches: - - '*' - -jobs: - linux: - name: Linux - runs-on: ubuntu-latest - container: "maven:3.6.3-jdk-8-slim" - steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-ubuntu-latest-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-ubuntu-latest- - - name: 'Build' - run: mvn -B -V --no-transfer-progress -Prun-its clean verify --fail-at-end - windows: - name: 'Windows' - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-windows-latest-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-windows-latest- - - name: 'Set up JDK 8' - uses: actions/setup-java@v1 - with: - java-version: 8 - - name: 'Build' - shell: bash - run: mvn -B -V --no-transfer-progress -Prun-its clean verify --fail-at-end - mac: - name: 'Mac OS' - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-macos-latest-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-macos-latest- - - name: 'Set up JDK 8' - uses: actions/setup-java@v1 - with: - java-version: 8 - - name: 'Build' - run: mvn -B -V --no-transfer-progress -Prun-its clean verify --fail-at-end diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 000000000..df0d8d5ff --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,54 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: GitHub CI + +on: [push, pull_request] + +jobs: + build: + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + java: [8, 11, 14, 15, 16, 17-ea] + jdk: [adopt, zulu] + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up cache for ~./m2/repository + uses: actions/cache@v2.1.5 + with: + path: ~/.m2/repository + key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} + restore-keys: | + maven-${{ matrix.os }}-java${{ matrix.java }}- + maven-${{ matrix.os }}- + + - name: Set up JDK + uses: actions/setup-java@v2.1.0 + with: + distribution: ${{ matrix.jdk }} + java-version: ${{ matrix.java }} + + - name: Build with Maven + run: mvn verify -e -B -V -P run-its javadoc:javadoc site site:stage diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 000000000..4e2af9953 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,12 @@ +name: Release Drafter +on: + push: + branches: + - master +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5.15.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}