mirror of https://github.com/actions/toolkit
![]() * Add io lib * io cleanup * Run format script * Fix lint errors with autofix * Fix equality lint errors * Rename ioUtil to io-util * Add no-import-requires * Run auto-fix lint * Remove lint errors * Use Boolean() to convert options - `CopyOptions` on `cp` now defaults to empty - Setting option values is easier now * Rewrite packages/io to be fully async * Move IS_WINDOWS into ioUtil * DRY up cp/mv by moving shared code into move function * Remove unc support, change isDirectory call to stat * Tighter try catches * more concise extensions search * Allow isDirectory to be stat or lstat * format * Shell out to rm -rf * Remove unc comment * Export fs.promises from io-util * Remove unknown error message * Create an optimistic mkdirp * Update io-util.ts * Update io-util.ts * Update io.test.ts * Fix tests for mkdirP |
||
---|---|---|
.github | ||
docs | ||
packages | ||
scripts | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.json | ||
LICENSE.md | ||
README.md | ||
jest.config.js | ||
lerna.json | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
Actions Toolkit 🛠
Packages
Package | Description |
---|---|
@actions/exit | Provides utilities for exiting from an action |
@actions/toolkit | A general-purpose toolkit for writing actions |
Development
This repository uses Lerna to manage multiple packages. Read the documentation there to begin contributing.
Useful Scripts
npm run bootstrap
This runslerna bootstrap
which will install dependencies in this repository's packages and cross-link packages where necessary.npm run build
This compiles TypeScript code in each package (this is especially important if one package relies on changes in another when you're running tests). This is just an alias forlerna run tsc
.npm run format
This checks that formatting has been applied with Prettier.npm test
This runs all Jest tests in all packages in this repository.- If you need to run tests for only one package, you can pass normal Jest CLI options:
$ npm test -- packages/toolkit
- If you need to run tests for only one package, you can pass normal Jest CLI options:
npm run create-package [name]
This runs a script that automates a couple of parts of creating a new package.
Creating a Package
- In a new branch, create a new Lerna package:
$ npm run create-package new-package
This will ask you some questions about the new package. Start with 0.0.0
as the first version (look generally at some of the other packages for how the package.json is structured).
- Add
tsc
script to the new package's package.json file:
"scripts": {
"tsc": "tsc"
}
- Start developing 😄 and open a pull request.