Skip to content

Commit

Permalink
Merge pull request #705 from ascopes/task/simplify-deployments
Browse files Browse the repository at this point in the history
Simplify deployment process
  • Loading branch information
ascopes authored Jul 22, 2024
2 parents 72a2988 + 484f82e commit 85227f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 37 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,12 @@ jobs:
./mvnw -B -e \
-Preleases \
-Pmaven-central \
-Darguments='-Preleases -Pmaven-central' \
-DdryRun='${{ inputs.dry-run }}' \
-Dpassword='${{ secrets.GITHUB_TOKEN }}' \
-DreleaseVersion="${release_version}" \
-DsignTag=false \
-Dtag="v${release_version}" \
clean release:prepare release:perform
clean verify release:prepare release:perform
echo "Created staging release for ${group_id}/${artifact_id}/${release_version}"
env:
Expand Down
51 changes: 17 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@

<contributors />

<distributionManagement>
<repository>
<id>ossrh</id>
<name>Maven Central Releases</name>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<name>Maven Central Snapshots</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/ascopes/java-compiler-testing/issues</url>
Expand Down Expand Up @@ -420,6 +433,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<!-- Don't bother testing, we do that prior to calling this in CI. -->
<arguments>-Dmaven.test.skip -Dinvoker.skip -Preleases</arguments>
<goals>deploy</goals>
<preparationGoals>clean verify</preparationGoals>
<releaseProfiles>releases</releaseProfiles>
</configuration>
</plugin>
Expand Down Expand Up @@ -664,40 +681,6 @@
</build>

<profiles>
<profile>
<id>maven-central</id>

<distributionManagement>
<repository>
<id>ossrh</id>
<name>Maven Central Releases</name>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<name>Maven Central Snapshots</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>

<profile>
<id>github</id>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/${project-slug}</url>
</repository>
<snapshotRepository>
<id>github</id>
<name>GitHub Packages Snapshots</name>
<url>https://maven.pkg.github.com/${project-slug}</url>
</snapshotRepository>
</distributionManagement>
</profile>

<profile>
<id>releases</id>

Expand Down

0 comments on commit 85227f9

Please sign in to comment.