[maven-release-plugin] prepare for next development iteration #296
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
name: maven-release | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '*.md' | |
- '.gitignore' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: corretto | |
cache: maven | |
server-id: ossrh # Value of distributionManagement.repository.id field of pom.xml | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
settings-path: ${{ github.workspace }} # Location for settings.xml file | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Publish with Maven deploy | |
run: > | |
mvn | |
--batch-mode | |
--activate-profiles deploy | |
--settings $GITHUB_WORKSPACE/settings.xml | |
-Pcoverage | |
clean deploy | |
env: | |
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
trigger-github-release: | |
needs: build | |
name: Trigger GitHub release workflow | |
if: github.ref_type == 'tag' | |
uses: ./.github/workflows/release-on-github.yml | |
with: | |
tag: ${{ github.ref_name }} |