All contributions are welcome and greatly appreciated! However, please try to keep them limited in scope so that they can be more easily reviewed.
Warning
Check the engine property in package.json to see what
version of Node.js is required for local development. This can be different
from the version of Node.js used on the GitHub Actions runners. Tools like
nodenv can be used to manage your Node.js
version automatically.
-
Fork this repository
-
Clone your fork
-
Install the dependencies with
npm install -
Make and test your changes
-
Commit your changes
Make sure to do the following when you commit your changes:
- Increase the version number in
package.json - Run
npm installto ensure dependencies are up to date - Run
npm run allto run formatting, linting, etc.
- Increase the version number in
-
Open a pull request back to this repository
-
Notify the maintainers of this repository for peer review and approval
-
Merge 🎉
The maintainers of this repository will create a new release with your changes so that everyone can enjoy your contributions!
This project requires 100% test coverage.
Important
It is critical that we have 100% test coverage to ensure that we are not introducing any regressions. All changes will be throughly tested by maintainers of this repository before a new release is created.
As you make changes, it's a great idea to run the local-action tool regularly
against various repositories with different configurations.
-
Symlink your package folder (this should only need to be done once)
npm link
-
Test your updated version
local-action run <path> <entrypoint> <dotenv file> # Or... npm exec local-action run <path> <entrypoint> <dotenv file>
Once you're finished testing, make sure to unlink!
npm unlink @github/local-actionAfter making updates and running the test suite, please also make sure to test your updates using the following GitHub Actions repositories:
-
Clone each repository locally
-
From your
github/local-actionfork, test each actionnpm exec local-action \ "/<action repository clone path>/typescript-action" \ "src/main.ts" \ "<path to your .env file>" npm exec local-action \ "/<action repository clone path>/javascript-action" \ "src/main.ts" \ "<path to your .env file>"
For an example
.envfile to use for testing, see.env.example.
Simply run the following command to invoke the entire test suite:
npm run testNote
This requires that you have already run npm install
When updating any of the supported stubs for the GitHub Actions Toolkit, please make sure to also update the following. This helps ensure that we are using the latest supported versions of the toolkit packages, and makes comparing changes across commits easier.
-
The supported version in the
README.md| Package | Version | | ---------------------------------------------------------------------- | -------- | | [`@actions/artifact`](https://www.npmjs.com/package/@actions/artifact) | `2.3.2` | | [`@actions/core`](https://www.npmjs.com/package/@actions/core) | `1.11.1` | | [`@actions/github`](https://www.npmjs.com/package/@actions/github) | `6.0.1` |
-
The latest reviewed commit URL in the corresponding
src/stubs/*.tsfile/** * Last Reviewed Commit: https://github.com/actions/toolkit/blob/f58042f9cc16bcaa87afaa86c2974a8c771ce1ea/packages/artifact/src/artifact.ts * Last Reviewed Date: 2025-09-10 */
When comparing commits to see what has been updated in the toolkit packages, be sure to compare against the last reviewed commit in the corresponding stub file. This can be done more easily using the following URL format:
https://github.com/actions/toolkit/compare/<old commit>..main