-
Notifications
You must be signed in to change notification settings - Fork 0
Maven Workflows
Builds a maven project w/o maven central and JDK 17
You have multiple options to use this workflow:
- with-submodules: defines if the project has submodules to clone
- deploy: defines if the project should be deployed to OSSRH
- runs-on: defines the runner to use (default: ubuntu-latest)
- dependencies: defines the git urls for dependencies to install (have to be maven projects)
- install-self: defines whether the project shall install itself first (before running tests)
name: Maven Verify
on:
push: # Ignore releases and main dev branch
tags-ignore:
- 'v*'
branches-ignore:
- 'main'
pull_request:
types: [opened, synchronize, reopened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
verify:
uses: ArDoCo/actions/.github/workflows/maven.yml@main
with:
deploy: false
with-submodules: true
secrets:
OSSRH_USER: ${{secrets.OSSRH_USER}}
OSSRH_TOKEN: ${{secrets.OSSRH_TOKEN}}
GPG_KEY: ${{secrets.GPG_KEY}}
name: Maven Deploy
on:
push:
branches:
- 'main' # Build the latest develop-SNAPSHOT
paths:
- '**/src/**'
- '**/pom.xml'
- 'pom.xml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
uses: ArDoCo/actions/.github/workflows/maven.yml@main
with:
deploy: true
secrets:
OSSRH_USER: ${{secrets.OSSRH_USER}}
OSSRH_TOKEN: ${{secrets.OSSRH_TOKEN}}
GPG_KEY: ${{secrets.GPG_KEY}}
Verify a maven project via sonarcloud
name: Sonar Cloud
on:
push:
pull_request:
types: [opened, synchronize, reopened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
sonarcloud:
if: ${{ github.actor != 'dependabot[bot]' }}
uses: ArDoCo/actions/.github/workflows/sonarcloud.yml@main
with:
with-submodules: true
secrets:
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
Update Dependencies and Update Versions
- You can configure the optional property
create-tag
if you want to disable the creation of a tag. - You can configure the optional property
auto-digit
if you want to change the default digit that shall be incremented on release. Default is Patch (2.1.0 -> 2.1.1). Possible values areMajor
,Minor
andPatch
.
name: Maven Dependency Updates
on:
schedule:
- cron: "00 11 * * 2"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
update:
uses: ArDoCo/actions/.github/workflows/maven-update.yml@main
secrets:
# Needs to be a personal access token to push as a certain user; otherwise actions won't be triggered.
PAT: ${{ secrets.PAT }}
Create new Maven Release (only commits tags & branch and updates versions)
- You can configure the optional property
auto-digit
if you want to change the default digit that shall be incremented on release. Default is Patch (2.1.0 -> 2.1.1). Possible values areMajor
,Minor
andPatch
.
name: Maven Release
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
update:
uses: ArDoCo/actions/.github/workflows/maven-release.yml@main
secrets:
# Needs to be a personal access token to push as a certain user; otherwise actions won't be triggered.
PAT: ${{ secrets.PAT }}
Create a manual release based on user input.
- You can configure the optional property
auto-digit
if you want to change the default digit that shall be incremented on release. Default is Patch (2.1.0 -> 2.1.1). Possible values areMajor
,Minor
andPatch
.
name: Maven Release (Manual)
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
release-version:
type: string
description: The version for release. E.g., "1.2.3"
required: true
next-version:
type: string
description: The version after release. E.g., "2.0.0-SNAPSHOT"
required: true
jobs:
release:
uses: ArDoCo/actions/.github/workflows/maven-manual-release.yml@main
secrets:
# Needs to be a personal access token to push as a certain user; otherwise actions won't be triggered.
PAT: ${{ secrets.PAT }}
with:
release-version: ${{ github.event.inputs.release-version }}
next-version: ${{ github.event.inputs.next-version }}