forked from odpi/egeria-connector-ibm-information-server
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 2.27 KB
/
merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the ODPi Egeria project.
name: "Build"
# Trigger after code is merged. only on main repo
# - does not run on modification (may be just text)
on:
push:
branches: [master, release-*]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: "Merge"
steps:
- uses: actions/checkout@v2
name: Checkout source
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
# Java 11 is used for merge builds (PRs do check Java latest)
java-version: '11'
distribution: 'adopt'
# 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 main
- name: Build with Maven (Publish snapshots to maven central)
if: ${{ github.repository == 'odpi/egeria-connector-ibm-information-server' && github.ref == 'refs/heads/master'}}
# See https://github.com/actions/toolkit/issues/231 requires parms using . to be quoted
run: 'mvn -B -DuseMavenCentral clean deploy'
# 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 main
- name: Build with Maven (no snapshots published)
if: ${{ github.repository != 'odpi/egeria-connector-ibm-information-server' || github.ref != 'refs/heads/master'}}
run: mvn -B clean verify
# Mostly for verification - not published to the release itself for now
- name: Upload assemblies
uses: actions/upload-artifact@v2
with:
name: Assemblies
path: |
distribution/target/*.jar
ia-clientlibrary/target/*.jar
igc-clientlibrary/target/*.jar