Update support for each of the following packages to the latest versions:
@actions/artifact:5.0.2@actions/cache:5.0.3@actions/core:2.0.2@actions/github:7.0.0
Adds support for the @actions/cache package, allowing for local caching of
dependencies and other files between runs of a GitHub Action. This is achieved
by setting the LOCAL_ACTION_CACHE_PATH environment variable to a directory
where cache files will be stored.
For both @actions/artifact and @actions/cache, the LOCAL_ACTION_WORKSPACE
environment variable must be set. Otherwise, calling functions will throw an
error. Similarly, @actions/artifact requires the LOCAL_ACTION_ARTIFACT_PATH
environment variable to be set, and @actions/cache requires the
LOCAL_ACTION_CACHE_PATH environment variable to be set.
Removes support for custom paths in the target action's tsconfig.json. This
appears to have been causing issues with type-stripping and later versions of
Node.js.
This version adds support for
pre
and
post
scripts for actions. These should follow the same structure as the run action
code (see the
README.md for more
details).
This version adds experimental support for pnpm and yarn.
Depending on the package manager and version, the invocation of the tsx
command that drives @github/local-action is invoked differently.
| Package Manager | Version | Command |
|---|---|---|
npm |
Any | npm exec |
pnpm |
Any | pnpm dlx |
yarn |
<= 3 |
yarn exec |
yarn |
>= 4 |
yarn dlx |
Alongside this, yarn PnP support is implemented via
unplugging any modules stubbed by
@github/local-action and "re-plugging" after completion of the action run.
This support is still a work in progress. Any feedback or issues are welcome!
As of version 2.0.0, the local-action tool has been updated to require
Node.js v20.6.0 or higher. This is necessary to support ESM loaders to
override dependencies in the GitHub Actions Toolkit.
With the release of v1.0.0, there was a need to switch from
ts-node to
tsx. However, the bundled version of
tsx is being used, so you should no longer need to install either 😀