Skip to content

Releases: typesafegithub/github-workflows-kt

0.7.0

14 Feb 08:00
Compare
Choose a tag to compare

⭐ Features

  • #71: Generate action wrappers code
    From now on, you won't find hand-crafted action wrappers in the library - they are now generated based on action metadata file (action.yml). It makes adding new wrappers much simpler and boilerplate-free. From users' perspective, it provides KDoc documentation for all inputs, as provided by actions' authors. It also unlocks great possibilities, as e.g. changes to actions API will be easy to apply in batch to all wrappers (e. g. action outputs handling). Kudos to @jmfayard for supporting this effort, especially for preparing a PoC and showing me how to use kotlinpoet (Kotlin generation library) :)
  • Add wrapper for actions/setup-node@v2

🛠️ Fixes

  • #70: Incorrect YAML when value starts with *, [ or !

💣 Breaking changes

  • #71: Because the code is now generated, several breaking changes occurred. From what I remember when working on code generation:
    • CreateBranchV2 is now ActionCreateBranchV2 - the name is inferred straight from the action name (4a2f2ea)
    • in CheckoutV2, FetchDepth's concrete value is now passed with Value class instead of Quantity (a8bcdf1)
    • minor inconvenience: the order of arguments rendered to YAML for various actions may be different (e.g. for actions/setup-java@v2: 9e4b554)

0.6.1

04 Feb 07:45
Compare
Choose a tag to compare

⭐ Features

None.

🛠️ Fixes

  • #67: Consistency check job uses backward slashes when YAML generated on Windows

💣 Breaking changes

None.

0.6.0

02 Feb 06:36
Compare
Choose a tag to compare

⭐ Features

  • #53: Implement filters (branches, tags) for push and pull_request triggers
  • #55: Implement environment variables for workflows, jobs and steps
  • #57: Allow conditions for jobs
  • 594ce16: Add type-safe Cron() declaration (thanks @jmfayard!)

🛠️ Fixes

  • #52: Fix rendering of multiline action arguments

💣 Breaking changes

  • #53: PullRequest, Push and WorkflowDispatch are now classes, not objects. It means that using them as triggers requires syntax e.g. PullRequest(). It's done to be able to add parameters to them, e.g. filters, like mentioned in the features section. The triggers are now also in triggers package, not an inner class of Trigger (change e.g. ...Trigger.Push to ...triggers.Push in your imports)

0.5.0

28 Jan 07:15
Compare
Choose a tag to compare

⭐ Features

  • #43: Add wrappers for madhead/* actions. Thanks for contributing @madhead!
  • #37: Add wrapper for actions/setup-java
  • #40: Add wrapper for gradle-update/update-gradle-wrapper-action
  • #39: Add wrapper for gradle/wrapper-validation-action
  • #38: Add wrapper for gradle/gradle-build-action
  • #42: Add pull request trigger
  • #41: Add schedule trigger

🛠️ Fixes

  • #36: Fix multiline commands with leading pipes
  • #50: Don't overwrite job dependencies with consistency job
  • #47: Add missing parameters for actions/CheckoutV2

💣 Breaking changes

  • #48: Custom actions API: change constructor to accept owner, name and version as separate strings
  • actions/UploadArtifactV2 and actions/DownloadArtifactV2: rename artifact parameter to name (b23f671, 8f12c7f)
  • actions/CheckoutV2: Put FetchDepth type inside the wrapper class (b152a2b). It's enough to adjust the import

0.4.1

24 Jan 07:48
Compare
Choose a tag to compare

⭐ Features

None.

🛠️ Fixes

  • #36: Broken output for multi-line command

💣 Breaking changes

None.

0.4.0

23 Jan 20:50
Compare
Choose a tag to compare

⭐ Features

  • in case the library doesn't have the action you need, you can now define your custom wrappers over actions, by inheriting from it.krzeminski.githubactions.actions.Action
  • added missing GitHub hosted runner types (thanks @msfjarvis for contributing!)

🛠️ Fixes

  • #35: Forbid nesting DSL parts
  • #15: Remove default for Checkout's fetch-depth

💣 Breaking changes

  • classes corresponding to actions change names and places. E.g. Checkout becomes CheckoutV2, and they are now grouped into Kotlin packages that correspond to their owners, so GitHub-owned actions are in actions
  • the output YAML is now formatted more cleanly. Not a breaking change literally, but it will result in a noisy diff when upgrading from an older version of the library

0.3.0

20 Jan 19:31
Compare
Choose a tag to compare

⭐ Features

  • #23:
    • provide first-party API to output files directly
    • make consistency check optional with toYaml() function

🛠️ Fixes

None.

💣 Breaking changes

  • the toYaml function loses its arguments, in favor of moving the file paths to the workflow

0.2.0

18 Jan 16:28
Compare
Choose a tag to compare

For a generated workflow, a job is included that checks integrity between the source Kotlin script and the output YAML file.

💣 Breaking changes:

  • the toYaml function now needs two extra arguments which specify input and output files. They are needed to perform the consistency check described above

0.1.0

16 Jan 11:09
Compare
Choose a tag to compare

First release, some trivial workflows can be created.