https://github.com/koki-develop/ts-action-template
This is a template for creating GitHub Actions in TypeScript.
https://github.com/koki-develop/ts-action-template
Last synced: 10 months ago
JSON representation
This is a template for creating GitHub Actions in TypeScript.
- Host: GitHub
- URL: https://github.com/koki-develop/ts-action-template
- Owner: koki-develop
- License: mit
- Created: 2024-08-11T13:05:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T13:22:14.000Z (over 1 year ago)
- Last Synced: 2024-10-29T13:33:39.608Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 1.83 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ts-action-template
[](https://github.com/koki-develop/ts-action-template/releases/latest)
[](https://github.com/koki-develop/ts-action-template/actions/workflows/ci.yml)
[](https://github.com/koki-develop/ts-action-template/actions/workflows/build.yml)
This is a template for creating GitHub Actions in TypeScript.
## Requirements
[Bun](https://bun.sh/) is required.
## Getting Started
1. Click the `Use this template` button to create a new repository.
2. Move to `Settings` > `Actions` > `General` and enable `Allow GitHub Actions to create and approve pull requests`.
## Development
Install dependencies with `bun install`.
```console
$ bun install
```
Edit [`action.yml`](./action.yml) to set up the action.
Edit [`src/main.ts`](./src/main.ts) to implement the action.
## Test
Run `bun run test` to test the action. The testing framework is [Vitest](https://vitest.dev/).
```console
$ bun run test
```
## Release
First, run `bun run build` to build the source code. The built code will be output to the `dist/` directory. Commit the content of this directory.
```console
$ bun run build
$ git add dist
$ git commit -m "Build"
```
Finally, create a tag in semver format.
> [!NOTE]
> The major version tag (e.g. `v1`) will be created automatically by GitHub Actions.
> See: [`.github/workflows/major-version-sync.yml`](./.github/workflows/major-version-sync.yml)
```console
$ git tag v1.0.0
$ git push origin v1.0.0
```
Create a release on GitHub as needed.
## LICENSE
[MIT](./LICENSE)