From c819238eac40c6c90cf5be5c85510f1bc002c56d Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Sat, 3 Feb 2024 20:44:38 -0500 Subject: [PATCH 1/4] Create dependabot.yml --- .github/dependabot.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8cfc936 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,26 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "maven" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + target-branch: "dev" + open-pull-requests-limit: 10 + groups: + standard-plugins: + patterns: + - "org.codehaus.mojo:flatten-maven-plugin" + - "org.apache.maven.plugins*" + dependencies: + patterns: + - "org.apache.commons:commons-math3" + - "net.jcip:jcip-annotations" + test-dependencies: + patterns: + - "org.jacoco*" + - "org.junit.jupiter*" From 940c4846ddcc13ca031cb92aa94db94d165db0df Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Sun, 4 Feb 2024 02:57:48 -0500 Subject: [PATCH 2/4] update workflows (#15) --- .github/workflows/dev_build.yml | 15 ++++---- .github/workflows/release_build.yml | 48 ++++++++++++++++++++++++++ .github/workflows/release_pr_build.yml | 34 ++++++++++++++++++ 3 files changed, 88 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/release_build.yml create mode 100644 .github/workflows/release_pr_build.yml diff --git a/.github/workflows/dev_build.yml b/.github/workflows/dev_build.yml index cf423ec..5295194 100644 --- a/.github/workflows/dev_build.yml +++ b/.github/workflows/dev_build.yml @@ -6,31 +6,28 @@ # separate terms of service, privacy policy, and support # documentation. -name: Development Build +name: Util Development Build on: push: branches: [ "dev" ] - paths: - - '**.xml' - - '**.java' - pull_request: - branches: [ "dev", "main" ] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout Util - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' cache: maven + - name: Build Util - run: mvn clean package --file pom.xml + run: mvn clean install --file pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive # - name: Update dependency graph diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml new file mode 100644 index 0000000..0ec6a4c --- /dev/null +++ b/.github/workflows/release_build.yml @@ -0,0 +1,48 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Util Release Build + +on: + push: + tags: + - 'v*' + branches: ["main"] + +jobs: + create-release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout Util + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + + - name: Build Util + run: mvn clean install -Prelease --file pom.xml + + - name: Get Util Version + run: | + echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV" + + - name: Make Util Release + uses: ncipollo/release-action@v1.13.0 + with: + artifacts: "target/util-${{ env.version }}*.jar" + prerelease: ${{ endsWith(env.version, 'SNAPSHOT') || contains(env.version, '-RC') }} + name: "v${{ env.version }}" + tag: "v${{ env.version }}" + generateReleaseNotes: true + skipIfReleaseExists: true diff --git a/.github/workflows/release_pr_build.yml b/.github/workflows/release_pr_build.yml new file mode 100644 index 0000000..46fbf94 --- /dev/null +++ b/.github/workflows/release_pr_build.yml @@ -0,0 +1,34 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Util Release Pull Request Build + +on: + pull_request: + branches: ["main"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Util + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + + - name: Build Util + run: mvn clean install --file pom.xml + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + # - name: Update dependency graph + # uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 From 14a0e17fc5bf6b70ff20824b8822f45b3fb4e78f Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Sun, 4 Feb 2024 03:00:44 -0500 Subject: [PATCH 3/4] Delete .github/workflows/create_release_on_tag.yml --- .github/workflows/create_release_on_tag.yml | 44 --------------------- 1 file changed, 44 deletions(-) delete mode 100644 .github/workflows/create_release_on_tag.yml diff --git a/.github/workflows/create_release_on_tag.yml b/.github/workflows/create_release_on_tag.yml deleted file mode 100644 index 6b8891a..0000000 --- a/.github/workflows/create_release_on_tag.yml +++ /dev/null @@ -1,44 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Create Release - -on: - push: - tags: - - 'v*' - branches: ["main"] - -jobs: - create-release: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build - run: mvn clean install -Prelease --file pom.xml - - name: Get Version - run: | - echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV" - - name: Make Release - uses: ncipollo/release-action@v1 - with: - artifacts: "target/util-${{ env.version }}.jar,target/util-${{ env.version }}-sources.jar,target/util-${{ env.version }}-javadoc.jar" - prerelease: ${{ endsWith(env.version, 'SNAPSHOT') || contains(env.version, '-RC') }} - name: "v${{ env.version }}" - tag: "v${{ env.version }}" - generateReleaseNotes: true - skipIfReleaseExists: true From a23fa4eb53b6997c159798825e0b2065094846cb Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Sun, 4 Feb 2024 03:16:40 -0500 Subject: [PATCH 4/4] remove cache from release workflows --- .github/workflows/release_build.yml | 1 - .github/workflows/release_pr_build.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 0ec6a4c..7f2f5dc 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -28,7 +28,6 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: maven - name: Build Util run: mvn clean install -Prelease --file pom.xml diff --git a/.github/workflows/release_pr_build.yml b/.github/workflows/release_pr_build.yml index 46fbf94..63bb22f 100644 --- a/.github/workflows/release_pr_build.yml +++ b/.github/workflows/release_pr_build.yml @@ -24,7 +24,6 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: maven - name: Build Util run: mvn clean install --file pom.xml