Skip to content

Commit 43fa0c8

Browse files
committed
Update Typeflows and various API changes
1 parent 2d1cbfc commit 43fa0c8

7 files changed

Lines changed: 28 additions & 14 deletions

File tree

.github/typeflows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ flowchart LR
1313
workflowdispatch --> buildyml
1414
workflowdispatch --> updatedependenciesyml
1515
push -->|"paths(ignore: 1)"|buildyml
16-
pullrequest -->|"(*)"|buildyml
16+
pullrequest -->|"(*), paths(ignore: 1)"|buildyml
1717
schedule -->|"0 12 * * 5"|updatedependenciesyml
1818
buildyml --> repositorydispatchgithubrepository
1919
repositorydispatchgithubrepository -->|"release"|uploadreleaseyml

.github/typeflows/build/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
flowchart TD
66
workflowdispatch(["👤 workflow_dispatch"])
77
push(["📤 push<br/>paths(ignore: 1)"])
8-
pullrequest(["🔀 pull_request<br/>(*)"])
8+
pullrequest(["🔀 pull_request<br/>(*), paths(ignore: 1)"])
99
subgraph buildyml["Build in CI"]
1010
buildyml_metadata[["🔧 Workflow Config<br/>🔐 custom permissions"]]
1111
buildyml_build["Build and Test<br/>🐧 ubuntu-latest"]

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
### 1.2.0.0
6+
- Upgrade Typeflows and adjusted APIs
7+
58
### 1.1.1.0
69
- Upgrade Typeflows and adjusted APIs
710

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
com-vanniktech-gradle-maven-publish-plugin = "0.34.0"
33
kotlin = "2.2.20"
4-
typeflows = "0.29.0-beta"
4+
typeflows = "0.30.0-beta"
55
version-catalog-update = "1.0.1"
66

77
[plugins]

src/main/kotlin/org/http4k/typeflows/UpdateGradleProjectDependencies.kt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.http4k.typeflows
22

3-
import io.typeflows.github.workflow.GitHub.token
43
import io.typeflows.github.workflow.Cron
54
import io.typeflows.github.workflow.Job
65
import io.typeflows.github.workflow.Permission.Actions
@@ -56,15 +55,20 @@ class UpdateGradleProjectDependencies(
5655
PullRequests to Write
5756
)
5857

59-
steps += Checkout("Checkout repository") {
58+
steps += Checkout {
59+
name = "Checkout repository"
6060
token = Secrets.GITHUB_TOKEN.toString()
6161
}
6262

63-
steps += SetupJava(JDK, JAVA_VERSION, "Set up JDK")
63+
steps += SetupJava(JDK, JAVA_VERSION) {
64+
name = "Set up JDK"
65+
}
6466

6567
steps += SetupGradle()
6668

67-
steps += RunCommand("./gradlew versionCatalogUpdate", "Build")
69+
steps += RunCommand("./gradlew versionCatalogUpdate") {
70+
name = "Build"
71+
}
6872
steps += buildCommand
6973

7074
steps += RunCommand(
@@ -75,12 +79,13 @@ class UpdateGradleProjectDependencies(
7579
echo "has_changes=true" >> $GITHUB_OUTPUT
7680
fi
7781
""".trimIndent(),
78-
"Check for changes"
7982
) {
83+
name = "Check for changes"
8084
id = "changes"
8185
}
8286

83-
steps += UseAction("peter-evans/create-pull-request@v6", "Create Pull Request") {
87+
steps += UseAction("peter-evans/create-pull-request@v6") {
88+
name = "Create Pull Request"
8489
condition = StrExp.of("steps.changes.outputs.has_changes")
8590

8691
with += mapOf(

src/typeflows/kotlin/Build.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@ class Build : Builder<Workflow> {
4444

4545
steps += SetupGradle()
4646

47-
steps += RunCommand("./gradlew check --info", "Build")
47+
steps += RunCommand("./gradlew check --info") {
48+
name = "Build"
49+
}
4850

4951
val token = Secrets.string("TOOLBOX_REPO_TOKEN")
5052

51-
steps += RunScript("scripts/tag-if-required.sh", "Release (if required)") {
53+
steps += RunScript("scripts/tag-if-required.sh") {
54+
name = "Release (if required)"
5255
id = "get-version"
5356
condition = StrExp.of("github.ref").isEqualTo("refs/heads/main")
5457
env["GH_TOKEN"] = token

src/typeflows/kotlin/UploadRelease.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class UploadRelease : Builder<Workflow> {
2828

2929
steps += SetupGradle()
3030

31-
steps += RunScript("scripts/publish-artifacts.sh", "Publish") {
31+
steps += RunScript("scripts/publish-artifacts.sh") {
32+
name = "Publish"
3233
env["RELEASE_VERSION"] = $$"${{ github.event.client_payload.tag }}"
3334
env["SIGNING_KEY"] = $$"${{ secrets.SIGNING_KEY }}"
3435
env["SIGNING_PASSWORD"] = $$"${{ secrets.SIGNING_PASSWORD }}"
@@ -38,11 +39,13 @@ class UploadRelease : Builder<Workflow> {
3839
env["ORG_GRADLE_PROJECT_signingInMemoryKeyPassword"] = $$"${{ secrets.SIGNING_PASSWORD }}"
3940
}
4041

41-
steps += RunScript("scripts/build-release-note.sh", "Build release note") {
42+
steps += RunScript("scripts/build-release-note.sh") {
43+
name = "Build release note"
4244
env["RELEASE_VERSION"] = $$"${{ github.event.client_payload.tag }}"
4345
}
4446

45-
steps += UseAction("actions/create-release@v1", "Create Release") {
47+
steps += UseAction("actions/create-release@v1") {
48+
name = "Create Release"
4649
env["GITHUB_TOKEN"] = Secrets.GITHUB_TOKEN
4750
with["tag_name"] = $$"${{ github.event.client_payload.tag }}"
4851
with["release_name"] = $$"${{ github.event.client_payload.tag }}"

0 commit comments

Comments
 (0)