mirror of
https://github.com/actions/add-to-project.git
synced 2025-12-15 06:27:22 +00:00
Improve linting
This commit is contained in:
16
README.md
16
README.md
@@ -29,17 +29,20 @@ adding repo issues to the project).
|
||||
|
||||
> 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
|
||||
```
|
||||
|
||||
Run the tests :heavy_check_mark:
|
||||
Run the tests :heavy_check_mark:
|
||||
|
||||
```bash
|
||||
$ npm test
|
||||
|
||||
@@ -64,9 +67,9 @@ import * as core from '@actions/core';
|
||||
...
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
try {
|
||||
...
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
@@ -79,9 +82,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
|
||||
@@ -91,7 +95,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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user