Creating a TypeScript action
In this recipe, you will create a basic TypeScript action from a template, build and publish it, and use it in a workflow.
Getting ready…
Make sure you have a reasonably modern version of Node.js (https://nodejs.org/en/download) installed. Follow these steps:
- Go to https://github.com/actions/typescript-action and click Use this template | Create a new repository in the top-right corner of the repository (see Figure 3.6):
Figure 3.6 – Creating a new repository from the typescript-action template
- Choose your GitHub account as the owner, name it
TypeScriptActionRecipe
, leave its visibility set to Public, and click Create repository. - Clone the repository locally and open the folder in VS Code.
How to do it…
- Open a terminal and go to the root of the repository. Install all the necessary dependencies:
$ npm install
The repository contains some unit tests. Run them to check...