I'm preparing to release 4.0.0. All breaking chang...
# github-workflows-kt
p
I'm preparing to release 4.0.0. All breaking changes I planned to push are already merged. Happy to get feedback on these - feel free to point your workflows to the nightly build:
Copy code
@file:Repository("https://central.sonatype.com/repository/maven-snapshots/")
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:4.0.0-SNAPSHOT")
I'm planning to hold with releasing and wait for feedback for ~1-2 weeks, since the number of breaking changes is fairly significant.
@LeoColman @Vampire have a moment to give 4.0.0-SNAPSHOT a try in your projects? 🙏
v
I published to maven local and used it in the workflows of two projects and the same YAML was generated.
🙌 1
I didn't get exactly the same YAML for 1 out of 7
It had a little breaking change too, but claude was able to solve it rather quickly
v
I would understand if it used a newer checkout action if you use the defaults, but an older seems strange
For me it didn't change as I used the "infer version from classpath option"
p
@LeoColman this is expected - you have
@file:DependsOn("actions:checkout:v3")
in your
.github/workflows/release.main.kts
, and starting from 4.0.0, for the consistency check job, the library will use the version of
actions/checkout
existing in the classpath. You see the diff because v4 was hardcoded in the library
the overarching goal is to let Renovate et. al. auto-merge version updates to
actions/checkout
, and thanks to the new logic of inferring its version, the consistency check job also gets a valid version bump
you can customize the consistency check job's checkout action's version in several ways, if needed - let me know if you need it
v
Ah, so the explicit config to infer from classpath is no longer necessary, nice
p
yes, it's the new default
👌 1
one of the breaking changes
Thanks for the feedback, folks! I think I know enough to roll out 4.0.0 later this week
v
Hm, there is one thing that is not super nice. If you have a workflow that does not use checkout action, you now get a failed run saying
Copy code
java.lang.IllegalStateException: actions/checkout is not found in the classpath! Either add a dependency on it (`@file:DependsOn("actions:checkout:<version>")`), or don't use CheckoutActionVersionSource.InferFromClasspath()
As the infering is now the default I already "do not use" it, at least not explicitly. Maybe the error message should be changed, or some version used as fallback instead now that the inferring is the default?
p
I'd lean towards improving the error message, since I want the API to stay the way it is, to help managing versions with e. g. dependency bots
Thanks for this feedback, generally makes sense. The percentage of workflows with no checkout is most likely low (<5%?), but worth having the clear error anyway. Feel free to propose something in a PR or at least send a simple issue for tracking
p
let's continue in the issue