Skip to content

Commit

Permalink
Merge pull request #4730 from planetf1/issue4664
Browse files Browse the repository at this point in the history
#4664 Merge pipeline (github actions) - snapshot publishing to maven …
  • Loading branch information
planetf1 committed Feb 24, 2021
2 parents 690e2d4 + 25d576c commit c1af916
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the ODPi Egeria project.
name: "Merge (Java8, Maven)"

# Trigger after code is merged. only on main repo
# - does not run on modification (may be just text)

on:
push:
branches: [master,egeria-release-*]

jobs:
build:
runs-on: ubuntu-latest
name: "Release"
steps:
- uses: actions/checkout@v2
name: Checkout source
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
# Java 1.8 is used for merge builds (PRs do check Java 11)
java-version: 1.8
# Publishing attributes for maven central (this step adds to setting.xml)
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
# Keys must be known to maven central - require broad publishing
gpg-private-key: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
# Build and publish - but only for master
- name: Build with Maven (Publish snapshots to maven central)
if: ${{ github.repository == 'odpi/egeria' && github.ref == 'refs/heads/master'}}
run: mvn -B -DuseMavenCentral clean verify
# Needed for publishing -- note we push to a staging area, login to oss.sonatype.org to
# verify (close) the repository & release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
# Build and publish - but only for master
- name: Build with Maven (no snapshots published to maven central)
if: ${{ github.repository != 'odpi/egeria' || github.ref != 'refs/heads/master'}}
run: mvn -B clean verify
# --
# TODO - Publish docker images
# --
# Mostly for verification - not published to the release itself for now
- name: Upload assemblies
uses: actions/upload-artifact@v2
with:
name: Assemblies
path: open-metadata-distribution/open-metadata-assemblies/target/*.gz

0 comments on commit c1af916

Please sign in to comment.