diff --git a/README.md b/README.md index 68d5d07..10598a4 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,21 @@ -

- typescript-action status -

- -# Create a JavaScript Action using TypeScript - -Use this template to bootstrap the creation of a TypeScript action.:rocket: - -This template includes compilation support, tests, a validation workflow, publishing, and versioning guidance. - -If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action) - -## Create an action from this template - -Click the `Use this Template` and provide the new repo details for your action - -## Code in Main +## Setup > First, you'll need to have a reasonably modern version of `node` handy. This won't work with versions older than 9, for instance. -Install the dependencies +Install the dependencies + ```bash $ npm install ``` Build the typescript and package it for distribution + ```bash -$ npm run build && npm run package +$ npm run package ``` -Run the tests :heavy_check_mark: +Run the tests :heavy_check_mark: + ```bash $ npm test @@ -57,9 +44,9 @@ import * as core from '@actions/core'; ... async function run() { - try { + try { ... - } + } catch (error) { core.setFailed(error.message); } @@ -72,9 +59,10 @@ See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/R ## Publish to a distribution branch -Actions are run from GitHub repos so we will checkin the packed dist folder. +Actions are run from GitHub repos so we will checkin the packed dist folder. Then run [ncc](https://github.com/zeit/ncc) and push the results: + ```bash $ npm run package $ git add dist @@ -84,7 +72,7 @@ $ git push origin releases/v1 Note: We recommend using the `--license` option for ncc, which will create a license file for all of the production node modules used in your project. -Your action is now published! :rocket: +Your action is now published! :rocket: See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)