Releases: JasonEtco/actions-toolkit
v6.0.1
Just a couple of dependency updates for security!
What’s Changed
- Bump node-fetch from 2.6.0 to 2.6.1 (#132) @dependabot
- Bump @actions/core from 1.2.4 to 1.2.6 (#133) @dependabot
v6.0.0
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
- Improve types for context.issue/pull_request (#131) @JasonEtco
- fix: return never from exit functions (#129) @likern
v5.0.0
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
- Fix deprecated issue/pull number context (#118) @mheap
- Moar tests (#126) @JasonEtco
- Toolkit#runInWorkspace => Toolkit#exec (#123) @JasonEtco
- Remove Store (#125) @JasonEtco
- Support github_token input in addition to env.GITHUB_TOKEN (#124) @JasonEtco
- feat(outputs): add outputs proxy to the toolkit (#120) @abouroubi
- Improve Toolkit#readFile (#121) @JasonEtco
- Updoots (#122) @JasonEtco
v4.0.0
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
What’s Changed
- Update dependencies (#117) @JasonEtco
- Fix broken actions events link (#113) @outsideris
- Point to actions/checkout if getFile throws (#115) @JasonEtco
- Bump minimist from 1.2.0 to 1.2.2 (#112) @dependabot
- Bump acorn from 6.4.0 to 6.4.1 (#111) @dependabot
v3.0.0
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 callcore.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 usetools.inputs
instead!tools.arguments
has been removed. You should probably usetools.inputs
instead!
What’s Changed
- Allow custom token to be supplied in options (#97) @danez
- Wrap @actions/core and enable new features (#107) @JasonEtco
- Update dependencies (#106) @JasonEtco
- Bump handlebars from 4.1.2 to 4.5.3 (#104) @dependabot
v2.2.0
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
- Use GitHub Actions for CI (#102) @JasonEtco
- Create actions with action.yml (#101) @JasonEtco
- npm audit fix (#100) @JasonEtco
- Add a note to the README about actions/toolkit (#99) @JasonEtco
- Bump lodash from 4.17.11 to 4.17.14 (#96) @dependabot
- add link to octokit/graphql repo for documentation (#95) @bdougie
- Bump js-yaml from 3.13.0 to 3.13.1 (#93) @dependabot
- Bump handlebars from 4.1.0 to 4.1.2 (#92) @dependabot
- Use a whitelist to specify files included in published package (#89) @kevinpollet
- Add Node.js 12 to Travis CI build matrix (#90) @kevinpollet
v2.1.0
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
v2.0.0
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
- Use GITHUB_REPOSITORY for context.repo (#75) @JasonEtco
- Make
context.issue
andcontext.repo
objects (#61) @jclem - [email protected] (#62) @JasonEtco