Skip to content

Releases: JasonEtco/actions-toolkit

v6.0.1

01 Oct 18:41
Compare
Choose a tag to compare

Just a couple of dependency updates for security!

What’s Changed

v6.0.0

09 Aug 21:07
Compare
Choose a tag to compare

This release includes two TypeScript changes - in an abundance of caution I've marked it as a new major version, but there aren't any changes other than the two PRs below. Have fun!

What’s Changed

v5.0.0

08 Jun 00:39
Compare
Choose a tag to compare

Breaking Changes

There are a couple of major improvements that are unfortunately breaking changes:

tools.context.issue returns a different object

Thanks to @mheap, tools.context.issue now returns { owner, repo, issue_number } instead of { owner, repo, number }. This is due to a change in the Octokit SDK. To have parity with pull requests, there is now also tools.context.pullRequest, which returns { owner, repo, pull_number }.

See #118 for more information!

Toolkit#getFile is now Toolkit#readFile

The getFile method has been renamed to readFile, and the behavior has changed. It now uses fs.promises.readFile under the hood, so it returns a promise:

const tools = new Toolkit({ ... })
const contents = await tools.readFile('README.md')

See #121 for more information!

tools.store has been removed

This feature was added before the Actions runtime had a way to share data between actions. That now exists in the platform, as "outputs"! See #125 for the removal of Store, and #120 for it's "replacement", tools.outputs (thanks to @abouroubi ✨):

tools.outputs.example = 'foo'

Toolkit#runInWorkspace is now Toolkit#exec

This method was useful, but @actions/exec is built more with the Actions runner in mind. So, now Toolkit#exec calls @actions/exec! This will be more stable for the finicky, ephemeral environments of Actions.

See #123 for more information!


What’s Changed

v4.0.0

04 Apr 01:44
Compare
Choose a tag to compare

This release only upgrades the bundled version of @octokit/rest tov17. See #109 for more details, but the breaking changes are best found in the @octokit/rest release!

v3.0.2

04 Apr 01:40
Compare
Choose a tag to compare

What’s Changed

v3.0.0

23 Feb 21:00
Compare
Choose a tag to compare

New features

This release brings a lot of new features that are available in the Actions runtime, mostly by wrapping actions/toolkit.

  • tools.inputs is a Proxy instance that lets you access the inputs of your action:
uses: JasonEtco/example-action@master
with:
  foo: bar

You can access those using tools.inputs:

console.log(tools.inputs.foo) // -> 'bar'
  • Toolkit.run will now call core.setFailed upon failure, which sets an annotation to expose the error message more clearly in the GitHub Actions UI.

Breaking changes

  • Toolkit#config has been removed. You should probably use tools.inputs instead!
  • tools.arguments has been removed. You should probably use tools.inputs instead!

What’s Changed

v2.2.0

26 Aug 15:56
Compare
Choose a tag to compare

This release includes some package updates, improvements to the published library (thanks @kevinpollet!) and an addition of action.yml to the generated template. This is to support GitHub Actions v2 🎉 2️⃣

What’s Changed

v2.1.0

16 May 14:45
Compare
Choose a tag to compare

This release is focused on improved TypeScript definitions and documentation upgrades! Now, types for modules that actions-toolkit directly exposes are included, so writing Actions in TypeScript should be a breeze 🌬

What’s Changed

2.0.0

12 May 01:22
294ac11
Compare
Choose a tag to compare
Create CODE_OF_CONDUCT.md

v2.0.0

31 Mar 19:30
Compare
Choose a tag to compare

Breaking changes

This release introduces breaking changes to tools.context.repo and tools.context.issue. Those are now properties instead of methods - here's the difference:

-tools.context.repo({
-  foo: true
-})
+{
+  ...tools.context.repo
+  foo: true
+}

Usage is the same as always, but using the object spread operator instead of passing an object to a method:

tools.github.issues.create({
  ...tools.context.repo,
  title: 'New issue'
})

This should help make those getters more clear and easier to use. As always, feel free to open an issue if you have feedback on this change!

What’s Changed