Skip to content

Releases: JasonEtco/actions-toolkit

v1.10.0

31 Mar 05:51
Compare
Choose a tag to compare

Testing!

This release improves the CLI scaffold template with a new file: index.test.js. It outlines a pattern for testing GItHub Actions with actions-toolkit, leveraging Toolkit.run. Try it out with:

npx actions-toolkit <folder>

I'll be sharing some docs on this soon!

What’s Changed

v2.0.0-beta.2

29 Mar 04:41
Compare
Choose a tag to compare
v2.0.0-beta.2 Pre-release
Pre-release

This release furthers the beta of v2.0.0 (#62). It reverts the changes added in #41 for exiting with a failing status with missing environment variables - this is due to additional friction and inconsistent lists that made the feature a little unreliable, so better to remove it.

What’s Changed

v1.9.1

29 Mar 04:44
Compare
Choose a tag to compare

What’s Changed

v1.9.0: `secrets` option

27 Mar 22:23
Compare
Choose a tag to compare

New feature

This release introduces the secrets option. If present, the Action will exit and fail if required secrets have not been set. Here's an example:

action "My action" {
  uses = "JasonEtco/secrets@master"
  secrets = ["API_KEY"]
}
// This will fail because `API_SECRET` wasn't passed!
new Toolkit({ secrets: ['API_KEY', 'API_SECRET'] })

Check out #66 for all the details ✨

What’s Changed

v1.8.1

27 Mar 02:27
Compare
Choose a tag to compare

What’s Changed

v1.8.0: Toolkit#run

27 Mar 01:04
Compare
Choose a tag to compare

New feature

In #63, @jclem added a new static method to the Toolkit class: #run. It takes a function argument and runs that function, as a way of enabling easier async/await patterns and modularity. Check it out!

const { Toolkit } = require('actions-toolkit')

Toolkit.run(async tools => {
  tools.log.success('We did it team!')
})

What’s Changed

v1.7.0: CLI Magic

23 Mar 23:24
Compare
Choose a tag to compare

Enhanced CLI

This release introduces a wonderfully enhanced CLI tool for creating a new GitHub Action, courtesy of @macklinu. Check out #57 for the full details ✨ You can run it through npx:

npx actions-toolkit my-action

What’s Changed

v2.0.0-beta.1

21 Mar 00:16
Compare
Choose a tag to compare
v2.0.0-beta.1 Pre-release
Pre-release

Nothing to see here, just fixing a release process that borked for 2.0.0-beta.1 and resulted in an empty publish.

v2.0.0-beta.0

20 Mar 23:46
Compare
Choose a tag to compare
v2.0.0-beta.0 Pre-release
Pre-release

This release introduces a few breaking changes, for reliability and for clarity.

Required environment variables, #41

The first is a change to the Toolkit constructor - the list of environment variables that are available in the GitHub Actions runtime is now required when using actions-toolkit. This is to encourage predictability, and while it won't break any Actions being run by GitHub, it may affect automated tests that don't set all of the expected environment variables. I'm really looking for feedback on this change - if it feels too heavy handed, let me know in #62!

context.repo and context.issue are objects, not functions #61

I love this change (shoutout @jclem) - tools.context.repo and tools.context.issue are no longer functions that take an object parameter, but are rather helper getters that return an object:

- const params = tools.context.repo({ foo: true })
+ const params = { ...tools.context.repo, foo: true }

This is much more semantic and standard, and should result in less confusion for folks that aren't familiar with Probot's API.

1.6.0: Toolkit#command

16 Mar 20:47
Compare
Choose a tag to compare

New feature

This release introduces Toolkit#command, a new method that will run the provided function when a matching slash-command is found. From the README:

Respond to a slash-command posted in a GitHub issue, comment, pull request, pull request review or commit comment. Arguments to the slash command are parsed by minimist. You can use a slash command in a larger comment, but the command must be at the start of the line:

Hey, let's deploy this!
/deploy --app example --container node:alpine
tools.command('deploy', async (args: ParsedArgs, match: RegExpExecArray) => {
  console.log(args)
  // -> { app: 'example', container: 'node:alpine' }
})

What’s Changed