Skip to content

build(deps): bump org.apache.commons:commons-configuration2 (#41) #185

build(deps): bump org.apache.commons:commons-configuration2 (#41)

build(deps): bump org.apache.commons:commons-configuration2 (#41) #185

Workflow file for this run

# 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 CI with Maven
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'corretto'
cache: maven
- name: Test with Maven
run: mvn -B --update-snapshots clean test
tag:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'corretto'
cache: maven
- name: Configure Git identity
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
- name: Create Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Creating release for version $VERSION"
if git show-ref --tags --verify --quiet "refs/tags/${VERSION}"; then
echo "Tag ${VERSION} exists. Skipping tag creation."
else
echo "Tag ${VERSION} does not exist"
git tag -a "${VERSION}" -m "Release ${VERSION}"
git push origin "${VERSION}"
fi
publish-nexus:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'corretto'
cache: maven
- name: Release Maven package
uses: samuelmeuli/[email protected]
with:
maven_profiles: ossrh
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}
continue-on-error: true
publish-github:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'corretto'
cache: maven
- name: Run GitHub Deploy
run: mvn --batch-mode deploy -Pgithub
continue-on-error: true
env:
GITHUB_TOKEN: ${{ github.token }}