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

Releas v4 (alpha) #730

Merged
merged 6 commits into from
Sep 24, 2024
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
27 changes: 20 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,26 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: gradle

# TODO
# - env:
# REPOSITORY_PASSWORD: ${{ secrets.HEXAGONTK_REPOSITORY_PASSWORD }}
# REPOSITORY_USERNAME: ${{ secrets.HEXAGONTK_REPOSITORY_USERNAME }}
# SIGNING_KEY: ${{ secrets.HEXAGONTK_SIGNING_KEY }}
# SIGNING_PASSWORD: ${{ secrets.HEXAGONTK_SIGNING_PASSWORD }}
# run: ./gradlew --no-daemon -x test release
# TODO Check if JReleaser can push tags without an extra command
- env:
STAGING_DIRECTORY: build/staging
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

SIGNING_KEY: ${{ secrets.HEXAGONTK_SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.HEXAGONTK_SIGNING_PASSWORD }}
REPOSITORY_USERNAME: ${{ secrets.HEXAGONTK_REPOSITORY_USERNAME }}
REPOSITORY_PASSWORD: ${{ secrets.HEXAGONTK_REPOSITORY_PASSWORD }}

JRELEASER_GPG_SECRET_KEY: ${{ secrets.HEXAGONTK_SIGNING_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.HEXAGONTK_SIGNING_PASSWORD }}
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.HEXAGONTK_REPOSITORY_USERNAME }}
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.HEXAGONTK_REPOSITORY_PASSWORD }}
run: |
export JRELEASER_GPG_PUBLIC_KEY="$(cat site/assets/project_hexagontk_com_public.key)"
./gradlew --no-daemon -x test publish
./gradlew --no-daemon -x test jreleaserFullRelease
git push --tags

build_site:
uses: hexagontk/hexagon/.github/workflows/site.yml@develop
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/release_branch.yml

This file was deleted.

38 changes: 37 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.github.jk1.license.render.InventoryHtmlReportRenderer
import com.github.jk1.license.render.InventoryMarkdownReportRenderer
import com.github.jk1.license.render.ReportRenderer
import org.gradle.api.tasks.wrapper.Wrapper.DistributionType.ALL
import org.jreleaser.model.Active.ALWAYS

/*
* Main build script, responsible for:
Expand All @@ -20,16 +21,17 @@ import org.gradle.api.tasks.wrapper.Wrapper.DistributionType.ALL
plugins {
kotlin("jvm") version(libs.versions.kotlin) apply(false)

id("java")
id("idea")
id("eclipse")
id("project-report")
id("org.jreleaser") version(libs.versions.jreleaser)
id("org.jetbrains.dokka") version(libs.versions.dokka)
id("com.github.jk1.dependency-license-report") version(libs.versions.licenseReport)
id("org.jetbrains.kotlinx.binary-compatibility-validator") version(libs.versions.binValidator)
id("org.graalvm.buildtools.native") version(libs.versions.nativeTools) apply(false)
id("io.gitlab.arturbosch.detekt") version(libs.versions.detekt) apply(false)
id("me.champeau.jmh") version(libs.versions.jmhGradle) apply(false)
id("org.jreleaser") version(libs.versions.jreleaser) apply(false)
}

apply(from = "gradle/certificates.gradle")
Expand Down Expand Up @@ -166,3 +168,37 @@ apiValidation {
)
)
}

jreleaser {
dryrun = true

signing {
active.set(ALWAYS)
armored = true
}

// TODO Enable GitHub release creation directly
release {
github {
tagName = "{{projectVersion}}"
skipRelease = true
}
}

// TODO Leave Maven Central rules enabled (resolve problems with Kotlin POMs)
deploy {
maven {
mavenCentral {
create("sonatype") {
applyMavenCentralRules = false // Already checked
active.set(ALWAYS)
url = "https://central.sonatype.com/api/v1/publisher"

val stagingProperty = findProperty("stagingDirectory")?.toString()
val stagingDirectory = stagingProperty ?: System.getenv("STAGING_DIRECTORY")
stagingRepository(stagingDirectory)
}
}
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.warning.mode=all
org.gradle.console=plain

# Gradle
version=4.0.0-A1
version=4.0.0-A3
group=com.hexagontk
description=The atoms of your platform

Expand Down
35 changes: 12 additions & 23 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

apply(plugin: "signing")
apply(plugin: "maven-publish")
apply(plugin: "maven-publish")
apply(plugin: "org.jreleaser")

signing {
String signingKey = findProperty("signingKey") ?: System.getenv("SIGNING_KEY")
Expand All @@ -19,11 +17,19 @@ signing {
publishing {
repositories {
maven {
url = "https://central.sonatype.com"
String stagingDirectory =
findProperty("stagingDirectory") ?: System.getenv("STAGING_DIRECTORY")

if (stagingDirectory == null) {
url = "https://central.sonatype.com"

credentials {
username = findProperty("ossrhUsername") ?: System.getenv("REPOSITORY_USERNAME")
password = findProperty("ossrhPassword") ?: System.getenv("REPOSITORY_PASSWORD")
credentials {
username = findProperty("ossrhUsername") ?: System.getenv("REPOSITORY_USERNAME")
password = findProperty("ossrhPassword") ?: System.getenv("REPOSITORY_PASSWORD")
}
}
else {
url = rootProject.file(stagingDirectory)
}
}
}
Expand Down Expand Up @@ -61,20 +67,3 @@ publishing {
}
}
}

jreleaser {
// signing {
// active = 'ALWAYS'
// armored = true
// }
deploy {
maven {
mavenCentral {
sonatype {
active = 'ALWAYS'
url = 'https://central.sonatype.com/api/v1/publisher'
}
}
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ dependencyResolutionManagement {
version("nativeTools", "0.10.3")
version("detekt", "1.23.7")
version("jmhGradle", "0.7.2")
version("gradleWrapper", "8.10.1")
version("mkdocsMaterial", "9.5.34")
version("gradleWrapper", "8.10.2")
version("mkdocsMaterial", "9.5.36")
version("mermaidDokka", "0.6.0")
version("maven", "3.9.9")
version("jreleaser", "1.14.0")
Expand Down
53 changes: 0 additions & 53 deletions site/assets/project_hexagonkt_com_public.key

This file was deleted.

20 changes: 3 additions & 17 deletions site/pages/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,7 @@ a project from scratch following these steps:

# Dependencies Verification
Hexagon's dependencies are signed, you can get the public key at the
[OpenPGP Public Key Server][pgp key] or [here][site pgp key].

These are the details of the public key:

```
pub 4096R/2AEE3721 2020-05-30 Hexagon Toolkit (Key used to sign published binaries) <project@hexagonkt.com>
Fingerprint=792B D37F F598 91C4 AC6F 8D92 3B26 711D 2AEE 3721
```

[pgp key]: https://keys.openpgp.org/search?q=project%40hexagonkt.com
[site pgp key]: project_hexagonkt_com_public.key

# Dependencies Verification (hexagontk.com)
Hexagon's dependencies are signed, you can get the public key at the
[Ubuntu Public Key Server][pgp key 2] or [here][site pgp key 2].
[Ubuntu Public Key Server][pgp key] or [here][site pgp key].

These are the details of the public key:

Expand All @@ -60,8 +46,8 @@ pub ed25519/0E16E194 2024-08-24 Hexagon Toolkit (Key used to sign published bin
268363E34136BFA0AA6C8AE61902F0990E16E194
```

[pgp key 2]: https://keyserver.ubuntu.com/pks/lookup?search=project%40hexagontk.com&op=index
[site pgp key 2]: project_hexagontk_com_public.key
[pgp key]: https://keyserver.ubuntu.com/pks/lookup?search=project%40hexagontk.com&op=index
[site pgp key]: project_hexagontk_com_public.key

# Next Steps
To continue learning about this toolkit, you can:
Expand Down
2 changes: 1 addition & 1 deletion starters/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

## Maven Starters
# Module starters

This module holds the Maven parent POMs with Kotlin setup to ease the project creation using
[Maven](https://maven.apache.org). To use them declare the following `parent` section inside your
Expand Down
1 change: 1 addition & 0 deletions starters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import javax.xml.parsers.DocumentBuilderFactory

apply(from = "../gradle/kotlin.gradle")
apply(from = "../gradle/publish.gradle")
apply(from = "../gradle/dokka.gradle")

extensions.configure<PublishingExtension> {
publications {
Expand Down
Loading