Skip to content

Commit

Permalink
Fix github maven publish issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieun committed Apr 24, 2024
1 parent 5e1b023 commit f44c267
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
run: ./gradlew publish
run: ./gradlew publish -Pgithub
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 2 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,8 @@ publishing {
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/sktston/spring-asciidoctor-backends-custom")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
name = "project"
url = file(mavenProjectRepository).toURI()
}
}
}
38 changes: 7 additions & 31 deletions gradle/publish-maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,17 @@ publishing {
name = project.description
description = project.description
artifactId = "spring-asciidoctor-backends"
url = "https://github.com/spring-io/spring-asciidoctor-backends"
organization {
name = "Spring IO"
url = "https://spring.io"
}
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
scm {
url = "https://github.com/spring-io/spring-asciidoctor-backends"
connection = "scm:git:git://github.com/spring-io/spring-asciidoctor-backends"
developerConnection = "scm:git:git://github.com/spring-io/spring-asciidoctor-backends"
}
developers {
developer {
id = "spring"
name = "Spring Team"
email = "[email protected]"
}
}
issueManagement {
system = "GitHub"
url = "https://github.com/spring-io/spring-asciidoctor-backends/issues"
}
}
}
if (project.hasProperty("distributionRepository")) {
if (project.hasProperty("github")) {
repositories {
maven {
url = "${distributionRepository}"
name = "distribution"
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/sktston/spring-asciidoctor-backends-custom")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ configurations {
}

dependencies {
asciidoctorExtensions "io.spring.asciidoctor.backends:spring-asciidoctor-backends:" + System.getenv("spring-asciidoctor-backends.version")
asciidoctorExtensions "com.sktelecom.asciidoctor.backends:spring-asciidoctor-backends:" + System.getenv("spring-asciidoctor-backends.version")
asciidoctorExtensions "org.asciidoctor:asciidoctorj-pdf:1.5.3"
}

Expand Down
14 changes: 14 additions & 0 deletions src/test/gradle/src/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ Here's the `build.gradle` that was used:
include::../../build.gradle[]
----

== Swift

[source, swift, options=nowrap]
----
let publicKeyCredentialProvider = ASAuthorizationPlatformPublicKeyCredentialProvider(relyingPartyIdentifier: domain)
// Fetch the challenge from the server. The challenge needs to be unique for each request.
// The userID is the identifier for the user's account.
let challenge = Data()
let userID = Data(UUID().uuidString.utf8)
let registrationRequest = publicKeyCredentialProvider.createCredentialRegistrationRequest(challenge: challenge,
----



== Summary
Expand Down
2 changes: 1 addition & 1 deletion src/test/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>io.spring.asciidoctor.backends</groupId>
<groupId>com.sktelecom.asciidoctor.backends</groupId>
<artifactId>spring-asciidoctor-backends</artifactId>
<version>${spring-asciidoctor-backends.version}</version>
</dependency>
Expand Down

0 comments on commit f44c267

Please sign in to comment.