Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4664 Release pipeline (github actions) #4729

Merged
merged 1 commit into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the ODPi Egeria project.
name: "Release (Java8, Maven)"

# Trigger when a Release is created in github
# - does not run on modification (may be just text)

on:
# No checks for branch or repo - assuming release creation is manual, controlled
release:
types:
- created
# Also allow for manual invocation for testing
workflow_dispatch:



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 final released build
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
# Normal build (in future may also run reports (site))
- name: Build with Maven
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 }}
# 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
37 changes: 37 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3893,5 +3893,42 @@
</plugins>
</build>
</profile>
<profile>
<id>dist-github</id>
<activation>
<property>
<name>useGitHub</name>
<value>true</value>
</property>
</activation>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/odpi/egeria</url>
</repository>
</distributionManagement>
</profile>
<profile>
<id>dist-oss</id>
<activation>
<property>
<name>useMavenCentral</name>
<value>true</value>
</property>
</activation>
<distributionManagement>
<repository>
<id>ossrh</id>
<name>Central Repository OSSRH - Staging</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<name>Central Repository OSSRH - Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
</project>