#87 - Initial scripts and tweaks for build and release via GitHub Actions.

This commit is contained in:
Oliver Drotbohm
2022-09-12 17:45:59 +02:00
parent 63a641de90
commit a656089bb4
10 changed files with 149 additions and 180 deletions

114
pom.xml
View File

@@ -111,38 +111,34 @@
</profile>
<profile>
<id>snapshot</id>
<id>artifactory</id>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.3.0</version>
<version>${artifactory-maven-plugin.version}</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<id>deploy-to-artifactory</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<buildInfo>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
<zip.name>spring-plugin</zip.name>
<zip.displayname>spring-plugin</zip.displayname>
<zip.deployed>false</zip.deployed>
<archives>*:*:*:*@zip</archives>
</deployProperties>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>{{ARTIFACTORY_USR}}</username>
<password>{{ARTIFACTORY_PSW}}</password>
<repoKey>libs-snapshot-local</repoKey>
<username>${env.ARTIFACTORY_USERNAME}</username>
<password>${env.ARTIFACTORY_PASSWORD}</password>
<repoKey>libs-milestone-local</repoKey>
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
</publisher>
<buildInfo>
<buildName>CI build for Spring Plugin ${project.version}</buildName>
</buildInfo>
</configuration>
</execution>
</executions>
@@ -152,85 +148,37 @@
</profile>
<profile>
<id>milestone</id>
<id>sonatype</id>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.3.0</version>
<inherited>false</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>build-info</id>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>publish</goal>
<goal>sign</goal>
</goals>
<configuration>
<buildInfo>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
<zip.name>spring-plugin</zip.name>
<zip.displayname>spring-plugin</zip.displayname>
<zip.deployed>false</zip.deployed>
<archives>*:*:*:*@zip</archives>
</deployProperties>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>{{ARTIFACTORY_USR}}</username>
<password>{{ARTIFACTORY_PSW}}</password>
<repoKey>libs-milestone-local</repoKey>
<snapshotRepoKey>libs-milestone-local</snapshotRepoKey>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.3.0</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<buildInfo>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
<zip.name>spring-plugin</zip.name>
<zip.displayname>spring-plugin</zip.displayname>
<zip.deployed>false</zip.deployed>
<archives>*:*:*:*@zip</archives>
</deployProperties>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>{{ARTIFACTORY_USR}}</username>
<password>{{ARTIFACTORY_PSW}}</password>
<repoKey>libs-release-local</repoKey>
<snapshotRepoKey>libs-release-local</snapshotRepoKey>
</publisher>
</configuration>
</execution>
</executions>
<configuration>
<passphrase>${env.GPG_PASSPHRASE}</passphrase>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>sonatype-new</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
</distributionManagement>
</profile>
</profiles>