Skip to content

Merge pull request #298 from JohT/renovate/jackson.version #464

Merge pull request #298 from JohT/renovate/jackson.version

Merge pull request #298 from JohT/renovate/jackson.version #464

name: Java Continuous Integration
on:
push:
branches:
- master
# Ignore changes in documentation and configuration.
# Need to contain the files listed in the git add parameters below.
paths-ignore:
- '**/LICENSE'
- '**.md'
- '.gitignore'
- '.gitattributes'
- 'renovate.json'
- '**/*.txt'
pull_request:
branches:
- master
# Ignore changes in documentation and configuration.
# Need to contain the files listed in the git add parameters below.
paths-ignore:
- '**/LICENSE'
- '**.md'
- '.gitignore'
- '.gitattributes'
- 'renovate.json'
- '**/*.txt'
jobs:
build:
runs-on: ubuntu-latest
env:
CI_COMMIT_CHANGELOG_MESSAGE: Update Changelog
CI_COMMIT_CHANGELOG_AUTHOR: ${{ github.event.repository.name }} Changelog Generator
steps:
- name: (GIT) Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
fetch-depth: 0
- name: (Setup) Java Development Kit (JDK) 11
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 11
cache: 'maven'
- name: (Maven) Build
run: mvn --batch-mode install --file pom.xml
- name: (Setup) Java Development Kit (JDK) 8 for integration tests
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 8
cache: 'maven'
- name: (Maven) Build and run integration tests
working-directory: type-alias-axon-serializer-integration-test
run: mvn --batch-mode package --file pom.xml
# Commit and push changelog on merge into "master" branch
- name: (Display) Environment variable "github.event_name"
run: echo "github.event_name=${{ github.event_name }}"
- name: (GIT) Commit Generated Changelog
# Only run when a pull request gets merged or a commit is pushed to the "master" branch.
# git add parameters need to directly or indirectly match paths-ignore parameters above.
if: github.event_name == 'push'
run: |
git config --global user.name '${{ env.CI_COMMIT_CHANGELOG_AUTHOR }}'
git config --global user.email 'joht@users.noreply.github.com'
git pull
git add CHANGELOG.md
git diff-index --quiet HEAD || git commit -m "${{ env.CI_COMMIT_CHANGELOG_MESSAGE }}"
git push