Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit b442eca

Browse files
authored
move deploy to profile (#128)
1 parent caa7114 commit b442eca

File tree

3 files changed

+57
-50
lines changed

3 files changed

+57
-50
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
architecture: x64
2525

2626
- name: 🚀 Deploy to Maven
27-
run: mvn -B deploy -f pom.xml -s settings.xml
27+
run: mvn -B deploy -f pom.xml -s settings.xml -P deploy
2828
env:
2929
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3030
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}

pom.xml

+55-45
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,60 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7+
<profiles>
8+
<profile>
9+
<id>deploy</id>
10+
11+
<distributionManagement>
12+
<snapshotRepository>
13+
<id>ossrh</id>
14+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
15+
</snapshotRepository>
16+
<repository>
17+
<id>ossrh</id>
18+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
19+
</repository>
20+
</distributionManagement>
21+
22+
<build>
23+
<plugins>
24+
<plugin>
25+
<groupId>org.sonatype.plugins</groupId>
26+
<artifactId>nexus-staging-maven-plugin</artifactId>
27+
<version>1.6.8</version>
28+
<extensions>true</extensions>
29+
<configuration>
30+
<serverId>ossrh</serverId>
31+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
32+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
33+
</configuration>
34+
</plugin>
35+
36+
<plugin>
37+
<groupId>org.apache.maven.plugins</groupId>
38+
<artifactId>maven-gpg-plugin</artifactId>
39+
<version>1.6</version>
40+
<executions>
41+
<execution>
42+
<id>sign-artifacts</id>
43+
<phase>verify</phase>
44+
<goals>
45+
<goal>sign</goal>
46+
</goals>
47+
<configuration>
48+
<gpgArguments>
49+
<arg>--pinentry-mode</arg>
50+
<arg>loopback</arg>
51+
</gpgArguments>
52+
</configuration>
53+
</execution>
54+
</executions>
55+
</plugin>
56+
</plugins>
57+
</build>
58+
</profile>
59+
</profiles>
60+
761
<properties>
862
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
963
</properties>
@@ -43,17 +97,6 @@
4397
<tag>HEAD</tag>
4498
</scm>
4599

46-
<distributionManagement>
47-
<snapshotRepository>
48-
<id>ossrh</id>
49-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
50-
</snapshotRepository>
51-
<repository>
52-
<id>ossrh</id>
53-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
54-
</repository>
55-
</distributionManagement>
56-
57100
<build>
58101
<plugins>
59102
<plugin>
@@ -111,39 +154,6 @@
111154
</configuration>
112155
</plugin>
113156

114-
<plugin>
115-
<groupId>org.sonatype.plugins</groupId>
116-
<artifactId>nexus-staging-maven-plugin</artifactId>
117-
<version>1.6.8</version>
118-
<extensions>true</extensions>
119-
<configuration>
120-
<serverId>ossrh</serverId>
121-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
122-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
123-
</configuration>
124-
</plugin>
125-
126-
<plugin>
127-
<groupId>org.apache.maven.plugins</groupId>
128-
<artifactId>maven-gpg-plugin</artifactId>
129-
<version>1.6</version>
130-
<executions>
131-
<execution>
132-
<id>sign-artifacts</id>
133-
<phase>verify</phase>
134-
<goals>
135-
<goal>sign</goal>
136-
</goals>
137-
<configuration>
138-
<gpgArguments>
139-
<arg>--pinentry-mode</arg>
140-
<arg>loopback</arg>
141-
</gpgArguments>
142-
</configuration>
143-
</execution>
144-
</executions>
145-
</plugin>
146-
147157
<!-- tests -->
148158
<plugin>
149159
<groupId>org.apache.maven.plugins</groupId>
@@ -174,4 +184,4 @@
174184
</dependency>
175185
</dependencies>
176186

177-
</project>
187+
</project>

settings.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313

1414
<profiles>
1515
<profile>
16-
<id>ossrh</id>
17-
<activation>
18-
<activeByDefault>true</activeByDefault>
19-
</activation>
16+
<id>deploy</id>
2017
<properties>
2118
<gpg.executable>gpg</gpg.executable>
2219
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>

0 commit comments

Comments
 (0)