1
mirror of https://github.com/CarmJos/GithubReleases4J.git synced 2026-06-04 21:18:16 +08:00

3 Commits

Author SHA1 Message Date
carm c53ca18e96 [v1.2.2] [A] Add GPG Settings. 2022-01-22 14:41:52 +08:00
carm a3cb4bcb1a [v1.2.2] [A] Add GPG Settings. 2022-01-22 14:35:45 +08:00
carm 7eae212bc3 [v1.2.2] [A] Add GPG Settings. 2022-01-22 14:13:41 +08:00
4 changed files with 28 additions and 8 deletions
+4 -1
View File
@@ -26,12 +26,15 @@ jobs:
server-id: github
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: "Maven Deploy"
run: mvn -B deploy --file pom.xml -DskipTests
env:
MAVEN_USERNAME: ${{ github.repository_owner }}
MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}}
MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}} # env variable for gpg signing in deploy
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: "Javadoc Deploy Staging"
run: |
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
- name: "Package"
run: mvn -B package --file pom.xml -Dmaven.javadoc.skip=true
run: mvn --no-transfer-progress -B package --file pom.xml -Dmaven.javadoc.skip=true
env:
MAVEN_USERNAME: ${{ github.repository_owner }}
MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}}
+21 -1
View File
@@ -14,7 +14,7 @@
<groupId>cc.carm.lib</groupId>
<artifactId>githubreleases4j</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>
<name>GithubReleases4J</name>
<description>Github Releases for Java</description>
@@ -130,6 +130,26 @@
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
@@ -8,7 +8,6 @@ import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@@ -135,10 +134,8 @@ public class GithubRelease {
*
* @return The author user {@link GithubUser}
*/
public @Nullable GithubUser getAuthor() {
return Optional.ofNullable(getContents().getJSONObject("author"))
.map(GithubUser::of)
.orElse(null);
public @NotNull GithubUser getAuthor() {
return GithubUser.of(getContents().getJSONObject("author"));
}
/**