Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/austenstone/action-javascript

Create a JavaScript Action
https://github.com/austenstone/action-javascript

actions javascript template

Last synced: 19 days ago
JSON representation

Create a JavaScript Action

Awesome Lists containing this project

README

        

# JavaScript Action Template

This repository serves as a [template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for JavaScript [Actions](https://docs.github.com/en/actions).

For TypeScript see [austenstone/action-typescript](https://github.com/austenstone/action-typescript).

## 🧑‍💻 Development
Use [nodemon](https://github.com/remy/nodemon) for a hot-reload dev environment.
```
npm run dev
```

## 🔨 Build
Build the project with [ncc](https://github.com/vercel/ncc).
The build artifacts will be stored in a single file `dist/index.js`.
```
npm run build
```

## 🧪 Test
Test the project with [jest](https://github.com/facebook/jest).
```
npm test
```

## 🧹 Lint
Linting is done with [eslint](https://github.com/eslint/eslint).
```
npm run lint
```

## 🏃 Usage
[Create a workflow](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file) (eg: [`.github/workflows/run.yml`](.github/workflows/usage.yaml))

### Default Workflow
```yml
name: "Add to Project"
on:
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: austenstone/action-javascript@main
```

## ➡️ Input Settings
Various inputs are defined in [`action.yml`](action.yml):

| Name | Description | Default |
| --- | - | - |
| github‑token | Token to use to authorize. | ${{ github.token }} |

## Further help
To get more help on the Actions see [documentation](https://docs.github.com/en/actions).