This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
Merge pull request #485 from dwolfson/main #184
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
# SPDX-License-Identifier: Apache-2.0 | |
# Copyright Contributors to the ODPi Egeria project. | |
name: "Merge" | |
# Trigger after code is merged. only on main repo | |
# - does not run on modification (may be just text) | |
on: | |
push: | |
branches: [main, release-4*] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
permissions: | |
# for gh-pages | |
contents: write | |
runs-on: ubuntu-latest | |
name: "Merge" | |
if: startsWith(github.repository,'odpi/') | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build and publish to Maven Central | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
cache-read-only: false | |
arguments: build publish | |
env: | |
OSSRH_GPG_KEYID: ${{ secrets.OSSRH_GPG_KEYID }} | |
OSSRH_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} | |
OSSRH_GPG_PRIVATE_KEY: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }} | |
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
- name: Build only (do not publish) | |
if: ${{ github.ref != 'refs/heads/main' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
cache-read-only: false | |
arguments: build | |
- name: Build JavaDocs | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
cache-read-only: false | |
arguments: aggregateJavadoc | |
- name: Publish JavaDocs | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: build/docs/javadoc | |
- name: Upload log of any dependency failures | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Dependency Analysis Report (on failure) | |
path: build/reports/dependency-analysis/build-health-report.txt | |
if-no-files-found: ignore | |
- name: Upload assemblies | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Assemblies | |
path: | | |
connector/build/libs/*.jar | |
migrator/build/libs/*.jar | |
- name: Upload Test coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Jacoco Coverage Report | |
path: build/reports/jacoco/codeCoverageReport | |
if-no-files-found: ignore |