Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hopefully Final Testdeployment #51

Merged
merged 4 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:

- name: Publish Library
env:
ORG_GPG_KEY_ID: ${{ secrets.ORG_GPG_KEY_ID }}
ORG_GPG_PASSPHRASE: ${{ secrets.ORG_GPG_PASSPHRASE }}
ORG_GPG_PRIVATE_KEY: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
ORG_OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ jobs:

- name: Publish Library
env:
ORG_GPG_KEY_ID: ${{ secrets.ORG_GPG_KEY_ID }}
ORG_GPG_PASSPHRASE: ${{ secrets.ORG_GPG_PASSPHRASE }}
ORG_GPG_PRIVATE_KEY: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
ORG_OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
ORG_OSSRH_USERNAME: ${{ secrets.ORG_OSSRH_USERNAME }}
run: ./gradlew publishAllPublicationsToOSSRHSnapshotRepository
run: ./gradlew --stacktrace publishAllPublicationsToOSSRHSnapshotRepository
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,9 @@ Snapshot builds are also available (but of course less stable): [Package view](h
See the [quickstart guide](https://github.com/eclipse-kuksa/kuksa-android-sdk/tree/main/docs/QUICKSTART.md) for
additional integration options.

### GitHub packages
### Maven Central

The KUKSA SDK is currently uploaded to [GitHub packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry)
where an [authentication](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#authenticating-to-github-packages)
is needed to download the dependency.

```
maven {
url = uri("https://maven.pkg.github.com/eclipse-kuksa/kuksa-android-sdk")
credentials {
username = <USERNAME>
password = <GITHUB_TOKEN>
}
}
```
The KUKSA SDK is currently uploaded to [Maven Central](https://central.sonatype.com/search?q=org.eclipse.kuksa).

## Usage

Expand Down
19 changes: 13 additions & 6 deletions buildSrc/src/main/kotlin/publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ interface PublishPluginExtension {

val extension = project.extensions.create<PublishPluginExtension>("publish")

// configure GPG -> https://docs.gradle.org/current/userguide/signing_plugin.html#example_configure_the_gnupgsignatory
ext["signing.gnupg.executable"] = "gpg"
ext["signing.gnupg.keyName"] = System.getenv("ORG_GPG_PRIVATE_KEY")
ext["signing.gnupg.passphrase"] = System.getenv("ORG_GPG_PASSPHRASE")

afterEvaluate {
publishing {
repositories {
Expand Down Expand Up @@ -79,7 +74,19 @@ afterEvaluate {
}

signing {
useGpgCmd()
var keyId: String? = System.getenv("ORG_GPG_KEY_ID")
if (keyId != null && keyId.length > 8) {
keyId = keyId.takeLast(8)
}
val privateKey = System.getenv("ORG_GPG_PRIVATE_KEY")
val passphrase = System.getenv("ORG_GPG_PASSPHRASE")

useInMemoryPgpKeys(
keyId,
privateKey,
passphrase,
)

sign(publishing.publications)
}
}
Expand Down