Skip to content

Commit 0f56650

Browse files
committed
Simplify deployment process
1 parent f7c5539 commit 0f56650

File tree

2 files changed

+18
-37
lines changed

2 files changed

+18
-37
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,12 @@ jobs:
6464
6565
./mvnw -B -e \
6666
-Preleases \
67-
-Pmaven-central \
68-
-Darguments='-Preleases -Pmaven-central' \
6967
-DdryRun='${{ inputs.dry-run }}' \
7068
-Dpassword='${{ secrets.GITHUB_TOKEN }}' \
7169
-DreleaseVersion="${release_version}" \
7270
-DsignTag=false \
7371
-Dtag="v${release_version}" \
74-
clean release:prepare release:perform
72+
clean verify release:prepare release:perform
7573
7674
echo "Created staging release for ${group_id}/${artifact_id}/${release_version}"
7775
env:

pom.xml

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@
5555

5656
<contributors />
5757

58+
<distributionManagement>
59+
<repository>
60+
<id>ossrh</id>
61+
<name>Maven Central Releases</name>
62+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
63+
</repository>
64+
<snapshotRepository>
65+
<id>ossrh</id>
66+
<name>Maven Central Snapshots</name>
67+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
68+
</snapshotRepository>
69+
</distributionManagement>
70+
5871
<issueManagement>
5972
<system>GitHub Issues</system>
6073
<url>https://github.com/ascopes/java-compiler-testing/issues</url>
@@ -420,6 +433,10 @@
420433
<groupId>org.apache.maven.plugins</groupId>
421434
<artifactId>maven-release-plugin</artifactId>
422435
<configuration>
436+
<!-- Don't bother testing, we do that prior to calling this in CI. -->
437+
<arguments>-Dmaven.test.skip -Dinvoker.skip -Preleases</arguments>
438+
<goals>deploy</goals>
439+
<preparationGoals>clean verify</preparationGoals>
423440
<releaseProfiles>releases</releaseProfiles>
424441
</configuration>
425442
</plugin>
@@ -664,40 +681,6 @@
664681
</build>
665682

666683
<profiles>
667-
<profile>
668-
<id>maven-central</id>
669-
670-
<distributionManagement>
671-
<repository>
672-
<id>ossrh</id>
673-
<name>Maven Central Releases</name>
674-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
675-
</repository>
676-
<snapshotRepository>
677-
<id>ossrh</id>
678-
<name>Maven Central Snapshots</name>
679-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
680-
</snapshotRepository>
681-
</distributionManagement>
682-
</profile>
683-
684-
<profile>
685-
<id>github</id>
686-
687-
<distributionManagement>
688-
<repository>
689-
<id>github</id>
690-
<name>GitHub Packages</name>
691-
<url>https://maven.pkg.github.com/${project-slug}</url>
692-
</repository>
693-
<snapshotRepository>
694-
<id>github</id>
695-
<name>GitHub Packages Snapshots</name>
696-
<url>https://maven.pkg.github.com/${project-slug}</url>
697-
</snapshotRepository>
698-
</distributionManagement>
699-
</profile>
700-
701684
<profile>
702685
<id>releases</id>
703686

0 commit comments

Comments
 (0)