-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bb95307
Showing
164 changed files
with
46,577 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 2 | ||
updates: | ||
|
||
# For Maven (Java) dependencies | ||
- package-ecosystem: "maven" | ||
directory: "/" # Location of pom.xml | ||
schedule: | ||
interval: "daily" # Frequency of update checks | ||
groups: | ||
all-dependencies: | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
name: Beta Build and Deploy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Install Docker Compose | ||
run: | | ||
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r .tag_name)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
docker-compose --version | ||
- name: Run MVN Verify | ||
run: | | ||
mvn -P coverage -B verify | ||
deploy: | ||
runs-on: ubuntu-22.04 | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: maven-settings-xml-action | ||
uses: whelk-io/maven-settings-xml-action@v20 | ||
with: | ||
servers: > | ||
[ | ||
{ | ||
"id": "nexus", | ||
"username": "${{ secrets.DEV_REPO_USERNAME }}", | ||
"password": "${{ secrets.DEV_REPO_PASSWORD }}" | ||
} | ||
] | ||
- name: Determine New Version | ||
id: new_version | ||
run: | | ||
# Fetch all tags to ensure they are available | ||
git fetch --tags | ||
# Get the latest tag | ||
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1` || echo "v0.0.0") | ||
echo "Latest tag: $latest_tag" | ||
# Remove 'v' prefix and split into components | ||
latest_version=${latest_tag#"v"} | ||
IFS='.' read -r major minor patch_prerelease <<< "${latest_version}" | ||
# Separate patch and prerelease if any | ||
if [[ "$patch_prerelease" == *"-"* ]]; then | ||
IFS='-' read -r patch prerelease <<< "$patch_prerelease" | ||
else | ||
patch="$patch_prerelease" | ||
prerelease="" | ||
fi | ||
echo "Current version: $latest_version" | ||
echo "Major: $major, Minor: $minor, Patch: $patch, Prerelease: $prerelease" | ||
# Determine the new version | ||
if [[ "$prerelease" == beta.* ]]; then | ||
# Latest tag is a beta tag, increment beta version | ||
beta_version=${prerelease#beta.} | ||
beta_version=$((beta_version + 1)) | ||
new_version="${major}.${minor}.${patch}-beta.${beta_version}" | ||
else | ||
# Latest tag is not a beta tag, start beta.1 | ||
beta_version=1 | ||
new_version="${major}.${minor}.${patch}-beta.${beta_version}" | ||
fi | ||
echo "New version: $new_version" | ||
# Set outputs | ||
echo "new_version=$new_version" >> $GITHUB_OUTPUT | ||
echo "tag_name=v$new_version" >> $GITHUB_OUTPUT | ||
- name: Configure Git | ||
run: | | ||
git config --global user.email "${{ secrets.GIT_USERNAME }}@digicert.com" | ||
git config --global user.name "${{ secrets.GIT_USERNAME }}" | ||
- name: Update Version in pom.xml | ||
run: | | ||
mvn versions:set -DnewVersion=${{ steps.new_version.outputs.new_version }} -DgenerateBackupPoms=false | ||
- name: Generate Javadocs | ||
run: mvn -pl library javadoc:javadoc | ||
|
||
- name: Create Tag | ||
run: | | ||
git tag -a v${{ steps.new_version.outputs.new_version }} -m "Tagging v${{ steps.new_version.outputs.new_version }}" | ||
git push origin v${{ steps.new_version.outputs.new_version }} | ||
- name: Configure GPG | ||
run: | | ||
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --yes --import | ||
# Setup the central server credentials in settings.xml | ||
- name: Configure Server Credentials for Maven Central | ||
uses: whelk-io/maven-settings-xml-action@v20 | ||
with: | ||
servers: > | ||
[ | ||
{ | ||
"id": "central", | ||
"username": "${{ secrets.MVN_CENTRAL_USERNAME }}", | ||
"password": "${{ secrets.MVN_CENTRAL_USER_TOKEN }}" | ||
} | ||
] | ||
- name: Deploy to Maven Central (no publish) | ||
run: | | ||
mvn -pl library javadoc:jar | ||
mvn -pl library deploy -P deploy-to-maven-central-beta -DskipTests -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} --batch-mode | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Publish to Maven Central | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Install Docker Compose | ||
run: | | ||
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r .tag_name)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
docker-compose --version | ||
- name: Run MVN Verify | ||
run: | | ||
mvn -P coverage -B verify | ||
publish: | ||
runs-on: ubuntu-22.04 | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Configure Git | ||
run: | | ||
git config --global user.email "${{ secrets.GIT_USERNAME }}@digicert.com" | ||
git config --global user.name "${{ secrets.GIT_USERNAME }}" | ||
- name: Update Version in pom.xml | ||
run: | | ||
mvn versions:set -DnewVersion=$(git tag --points-at HEAD | grep 'release' | sort -V | tail -n 1) -DgenerateBackupPoms=false | ||
- name: Generate Javadocs | ||
run: mvn -pl library javadoc:javadoc | ||
|
||
- name: Configure GPG | ||
run: | | ||
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --yes --import | ||
# Setup the central server credentials in settings.xml | ||
- name: Configure Server Credentials for Maven Central | ||
uses: whelk-io/maven-settings-xml-action@v20 | ||
with: | ||
servers: > | ||
[ | ||
{ | ||
"id": "central", | ||
"username": "${{ secrets.MVN_CENTRAL_USERNAME }}", | ||
"password": "${{ secrets.MVN_CENTRAL_USER_TOKEN }}" | ||
} | ||
] | ||
- name: Deploy to Maven Central | ||
run: | | ||
mvn -pl library javadoc:jar | ||
mvn -pl library deploy -P deploy-to-maven-central-beta -DskipTests -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -DautoReleaseAfterClose=false --batch-mode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL Advanced" | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '31 19 * * 4' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze (${{ matrix.language }}) | ||
# Runner size impacts CodeQL analysis time. To learn more, please see: | ||
# - https://gh.io/recommended-hardware-resources-for-running-codeql | ||
# - https://gh.io/supported-runners-and-hardware-resources | ||
# - https://gh.io/using-larger-runners (GitHub.com only) | ||
# Consider using larger runners or machines with greater resources for possible analysis time improvements. | ||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
|
||
# required to fetch internal or private CodeQL packs | ||
packages: read | ||
|
||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- language: java-kotlin | ||
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too. | ||
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' | ||
# Use `c-cpp` to analyze code written in C, C++ or both | ||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both | ||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both | ||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, | ||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. | ||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how | ||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
build-mode: ${{ matrix.build-mode }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
queries: security-extended,security-and-quality | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# If the analyze step fails for one of the languages you are analyzing with | ||
# "We were unable to automatically build your code", modify the matrix above | ||
# to set the build mode to "manual" for that language. Then modify this step | ||
# to build your code. | ||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
#- if: matrix.build-mode == 'manual' | ||
# shell: bash | ||
# run: | | ||
# echo 'If you are using a "manual" build mode for one or more of the' \ | ||
# 'languages you are analyzing, replace this with the commands to build' \ | ||
# 'your code, for example:' | ||
# echo ' make bootstrap' | ||
# echo ' make release' | ||
# exit 1 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# 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: Java Build and Test with Maven | ||
|
||
on: | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Install Docker Compose | ||
run: | | ||
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r .tag_name)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
docker-compose --version | ||
- name: Run MVN Verify | ||
run: | | ||
mvn -P coverage -B verify --file pom.xml |
Oops, something went wrong.