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

CD pipeline for tagged releases of EE10 version #356

Draft
wants to merge 2 commits into
base: develop-jakartaee-10
Choose a base branch
from
Draft
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
40 changes: 40 additions & 0 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release to Maven Central Repository
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'

- name: Build, test, verify
run: mvn -B verify
- name: Check POM metadata for release
run: mvn pomchecker:check-maven-central

# Running setup-java again overwrites the settings.xml - IT'S MANDATORY TO DO THIS SECOND SETUP!!!
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Sign + Publish release
run: mvn -Prelease deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
2 changes: 1 addition & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>rewrite-parent</artifactId>
<groupId>org.ocpsoft.rewrite</groupId>
<version>4.0.0-SNAPSHOT</version>
<version>6.0.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down
53 changes: 52 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<maven.compiler.release>11</maven.compiler.release>
<!-- Minimum JDK necessary to successfully compile and test -->
<maven.enforce.jdk>17.0.0</maven.enforce.jdk>
<maven.javadoc.lint>none</maven.javadoc.lint>

<!-- Allow to ignore some failing integration tests -->
<it.ignore.selectedFails>true</it.ignore.selectedFails>
Expand Down Expand Up @@ -67,7 +68,7 @@
<version.maven-enforcer-plugin>3.1.0</version.maven-enforcer-plugin>
<version.maven-flatten-plugin>1.3.0</version.maven-flatten-plugin>
<version.maven-gpg-plugin>3.0.1</version.maven-gpg-plugin>
<version.pomchecker-maven-plugin>1.3.0</version.pomchecker-maven-plugin>
<version.pomchecker-maven-plugin>1.4.0</version.pomchecker-maven-plugin>
<version.nexus-staging-plugin>1.6.13</version.nexus-staging-plugin>

</properties>
Expand Down Expand Up @@ -585,6 +586,56 @@
<!-- Intentionally left blank - used for CI matrix compatibility only -->
</profile>

<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<source>${maven.compiler.release}</source>
<detectJavaApiLink>false</detectJavaApiLink>
<doclint>${maven.javadoc.lint}</doclint>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- WILDFLY -->
<profile>
<id>WILDFLY_MANAGED</id>
Expand Down