Skip to content

Commit d5da0a5

Browse files
authored
Merge pull request #21 from johspaeth/develop
Merge deployments
2 parents de70196 + e651080 commit d5da0a5

File tree

2 files changed

+123
-9
lines changed

2 files changed

+123
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy PathExpression
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
deployment:
7+
runs-on: ubuntu-latest
8+
name: PathExpression deployment
9+
steps:
10+
- name: Checkout source code
11+
uses: actions/checkout@v3
12+
# Sets up Java version
13+
- name: Set up Java
14+
uses: actions/setup-java@v3
15+
with:
16+
distribution: 'adopt'
17+
java-package: 'jdk'
18+
java-version: '11'
19+
server-id: 'ossrh' # must match the serverId configured for the nexus-staging-maven-plugin
20+
server-username: OSSRH_USERNAME # Env var that holds your OSSRH user name
21+
server-password: OSSRH_PASSWORD # Env var that holds your OSSRH user pw
22+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Substituted with the value stored in the referenced secret
23+
gpg-passphrase: SIGN_KEY_PASS # Env var that holds the key's passphrase
24+
# Sets up Maven version
25+
- name: Set up Maven
26+
uses: stCarolas/setup-maven@v4.5
27+
with:
28+
maven-version: 3.6.3
29+
- name: Build & Deploy PathExpression
30+
run: mvn -B -U clean deploy -Pdeployment
31+
env:
32+
SIGN_KEY_PASS: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
33+
OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }}
34+
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PW }}

pom.xml

Lines changed: 89 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,88 @@
33
<groupId>de.fraunhofer.iem</groupId>
44
<artifactId>pathexpression</artifactId>
55
<version>1.0.1</version>
6+
7+
<licenses>
8+
<license>
9+
<name>Eclipse Public License - v2.0</name>
10+
<url>https://www.eclipse.org/legal/epl-2.0/</url>
11+
</license>
12+
</licenses>
13+
14+
<scm>
15+
<connection>scm:git:${project.scm.url}</connection>
16+
<developerConnection>scm:git:${project.scm.url}</developerConnection>
17+
<url>git@github.com:johspaeth/PathExpression.git</url>
18+
<tag>${project.version}</tag>
19+
</scm>
20+
<description>Implementation of an algorithm by Tarjan that efficiently computes path expressions based on a labeled graph</description>
21+
<url>https://github.com/johspaeth/PathExpression</url>
22+
23+
<developers>
24+
<developer>
25+
<name>Johannes Spaeth</name>
26+
<email>mail@johspaeth.de</email>
27+
</developer>
28+
</developers>
29+
30+
<profiles>
31+
<!-- This profile is used to avoid running the deployment in non-deployment
32+
contexts because they require specific keys from the Github remote. Include
33+
this profile by setting the -Pdeployment flag. -->
34+
<profile>
35+
<id>deployment</id>
36+
<build>
37+
<plugins>
38+
<plugin>
39+
<groupId>org.sonatype.plugins</groupId>
40+
<artifactId>nexus-staging-maven-plugin</artifactId>
41+
<version>1.6.13</version>
42+
<extensions>true</extensions>
43+
<configuration>
44+
<serverId>ossrh</serverId>
45+
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
46+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
47+
</configuration>
48+
</plugin>
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-source-plugin</artifactId>
52+
<version>3.2.1</version>
53+
<executions>
54+
<execution>
55+
<id>attach-source</id>
56+
<goals>
57+
<goal>jar</goal>
58+
</goals>
59+
</execution>
60+
</executions>
61+
</plugin>
62+
<plugin>
63+
<groupId>org.apache.maven.plugins</groupId>
64+
<artifactId>maven-gpg-plugin</artifactId>
65+
<version>3.0.1</version>
66+
<executions>
67+
<execution>
68+
<id>sign-artifacts</id>
69+
<phase>verify</phase>
70+
<goals>
71+
<goal>sign</goal>
72+
</goals>
73+
<configuration>
74+
<gpgArguments>
75+
<arg>--pinentry-mode</arg>
76+
<arg>loopback</arg>
77+
</gpgArguments>
78+
</configuration>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
</plugins>
83+
</build>
84+
</profile>
85+
</profiles>
86+
87+
688
<build>
789
<plugins>
890
<plugin>
@@ -19,12 +101,7 @@
19101
</plugin>
20102
</plugins>
21103
</build>
22-
<scm>
23-
<connection>scm:git:${project.scm.url}</connection>
24-
<developerConnection>scm:git:${project.scm.url}</developerConnection>
25-
<url>git@github.com:johspaeth/PathExpression.git</url>
26-
<tag>${project.version}</tag>
27-
</scm>
104+
28105
<dependencies>
29106
<dependency>
30107
<groupId>com.google.guava</groupId>
@@ -45,10 +122,13 @@
45122
</dependencies>
46123

47124
<distributionManagement>
125+
<snapshotRepository>
126+
<id>ossrh</id>
127+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
128+
</snapshotRepository>
48129
<repository>
49-
<id>github</id>
50-
<name>GitHub Packages</name>
51-
<url>https://maven.pkg.github.com/johspaeth/PathExpression</url>
130+
<id>ossrh</id>
131+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
52132
</repository>
53133
</distributionManagement>
54134
</project>

0 commit comments

Comments
 (0)