Skip to content

Commit 9de618d

Browse files
committed
chore(build): setup build for release
1 parent 1fa3cc8 commit 9de618d

File tree

3 files changed

+145
-1
lines changed

3 files changed

+145
-1
lines changed

.ci-settings.xml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!--
2+
~ Copyright (C) 2023 Intergral GmbH
3+
~
4+
~ This program is free software: you can redistribute it and/or modify
5+
~ it under the terms of the GNU Affero General Public License as published by
6+
~ the Free Software Foundation, either version 3 of the License, or
7+
~ (at your option) any later version.
8+
~
9+
~ This program is distributed in the hope that it will be useful,
10+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
~ GNU Affero General Public License for more details.
13+
~
14+
~ You should have received a copy of the GNU Affero General Public License
15+
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
-->
17+
18+
<settings>
19+
<servers>
20+
<server>
21+
<id>ossrh</id>
22+
<username>${env.OSS_USERNAME}</username>
23+
<password>${env.OSS_PASSWORD}</password>
24+
</server>
25+
</servers>
26+
</settings>

.github/workflows/on_release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
OSS_USERNAME: ${{ secrets.OSS_USERNAME }}
1212
OSS_PASSWORD: ${{ secrets.OSS_PASSWORD }}
1313
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
14+
VERSION: ${{ github.ref_name }}
1415

1516
steps:
1617
- uses: actions/checkout@v3
@@ -28,4 +29,5 @@ jobs:
2829
distribution: 'temurin'
2930
cache: 'maven'
3031
- name: Generate Java Proto
31-
run: make rel-java
32+
run: mvn versions:set -DnewVersion=${VERSION} -B -U
33+
- run: mvn -s .ci-settings.xml clean deploy -P release-ossrh -B -U -pl agent --also-make

pom.xml

+116
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,50 @@
2626
<version>1.0-SNAPSHOT</version>
2727
<packaging>pom</packaging>
2828

29+
<name>DEEP Java Agent</name>
30+
<description>Java agent for DEEP</description>
31+
32+
<url>https://intergral.com</url>
33+
34+
<licenses>
35+
<license>
36+
<name>AGPL-3.0-only</name>
37+
<url>https://github.com/intergral/deep-java-client/blob/master/LICENSE</url>
38+
<distribution>repo</distribution>
39+
</license>
40+
</licenses>
41+
42+
<organization>
43+
<name>Intergral GmbH</name>
44+
<url>https://intergral.com</url>
45+
</organization>
46+
47+
<scm>
48+
<url>https://github.com/intergral/deep-java-client</url>
49+
</scm>
50+
51+
<issueManagement>
52+
<system>github</system>
53+
<url>https://github.com/intergral/deep-java-client</url>
54+
</issueManagement>
55+
56+
<developers>
57+
<developer>
58+
<name>Intergral GmbH</name>
59+
<id>intergral</id>
60+
<organization>Intergral Information Solutions GmbH</organization>
61+
<email>[email protected]</email>
62+
<timezone>+1</timezone>
63+
<organizationUrl>https://www.intergral.com</organizationUrl>
64+
</developer>
65+
<developer>
66+
<name>Ben Donnelly</name>
67+
<id>bdonnell</id>
68+
<organization>Intergral GmbH</organization>
69+
<email>[email protected]</email>
70+
</developer>
71+
</developers>
72+
2973
<modules>
3074
<module>agent-api</module>
3175
<module>agent</module>
@@ -61,6 +105,78 @@
61105
<module>examples</module>
62106
</modules>
63107
</profile>
108+
109+
<!--This profile will deal with releasing the jar-->
110+
<profile>
111+
<id>release-ossrh</id>
112+
<activation>
113+
<activeByDefault>false</activeByDefault>
114+
</activation>
115+
<distributionManagement>
116+
<snapshotRepository>
117+
<id>ossrh</id>
118+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
119+
</snapshotRepository>
120+
<repository>
121+
<id>ossrh</id>
122+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
123+
</repository>
124+
</distributionManagement>
125+
<build>
126+
<pluginManagement>
127+
<plugins>
128+
<plugin>
129+
<groupId>org.sonatype.plugins</groupId>
130+
<artifactId>nexus-staging-maven-plugin</artifactId>
131+
<version>1.6.8</version>
132+
</plugin>
133+
<plugin>
134+
<groupId>org.apache.maven.plugins</groupId>
135+
<artifactId>maven-gpg-plugin</artifactId>
136+
<version>1.6</version>
137+
</plugin>
138+
</plugins>
139+
</pluginManagement>
140+
<plugins>
141+
<plugin>
142+
<groupId>org.sonatype.plugins</groupId>
143+
<artifactId>nexus-staging-maven-plugin</artifactId>
144+
<extensions>true</extensions>
145+
<configuration>
146+
<serverId>ossrh</serverId>
147+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
148+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
149+
</configuration>
150+
</plugin>
151+
<plugin>
152+
<groupId>org.apache.maven.plugins</groupId>
153+
<artifactId>maven-gpg-plugin</artifactId>
154+
<executions>
155+
<execution>
156+
<id>sign-artifacts</id>
157+
<phase>verify</phase>
158+
<goals>
159+
<goal>sign</goal>
160+
</goals>
161+
<configuration>
162+
<passphrase>${env.GPG_PASSPHRASE}</passphrase>
163+
<gpgArguments>
164+
<!--https://stackoverflow.com/questions/28859942/how-do-i-get-the-maven-gpg-plugin-to-use-a-passphrase-from-environment-variable-->
165+
<arg>--pinentry-mode</arg>
166+
<arg>loopback</arg>
167+
168+
<argument>--no-tty</argument>
169+
<argument>--batch</argument>
170+
</gpgArguments>
171+
<executable>gpg</executable>
172+
<keyname>0x8FD157B6</keyname>
173+
</configuration>
174+
</execution>
175+
</executions>
176+
</plugin>
177+
</plugins>
178+
</build>
179+
</profile>
64180
</profiles>
65181

66182
<dependencyManagement>

0 commit comments

Comments
 (0)