DEV Community

Cover image for Scaffold your GitHub actions with Yeoman generator 🚀
Rocktim Saikia
Rocktim Saikia

Posted on

2 1

Scaffold your GitHub actions with Yeoman generator 🚀

I created a Yeoman generator to easily scaffold your javascript-based Github actions.

GitHub logo RocktimSaikia / generator-github-action

Yeoman generator for scaffolding your javascript github action.

generator-github-action

A yeoman generator for scaffolding your javascript Github action

npm

💡 About

This is a yeoman generator for the official github action template for javascript provided by the Github team.

Installation

skip the first step if you already have yeoman installed globally.

npm install -g yo
npm install -g generator-github-action
Enter fullscreen mode Exit fullscreen mode

Then generate your new project:

yo github-action
Enter fullscreen mode Exit fullscreen mode

License

Apache-2.0 © Rocktim Saikia

Since the #actionshackathon is going on, there are going to be lots of forking and templating boilerplates. So I sat down and decided to create a Generator for this specific task so that you don't have to fork boilerplates every time you want to create a new Github Action.

Here is the Installation process followed by the Usage steps:

Installation

npm install -g yo
npm install -g generator-github-action
Enter fullscreen mode Exit fullscreen mode

If you already have yo installed globally then skip the first step. Install the generator only.

Example usage

yo github-action
Enter fullscreen mode Exit fullscreen mode

Alt Text

That will present a prompt asking a few questions about your project name and description etc. After that, It will generate a minimal set up for you to work on a javascript based Github action.

The generator will also install the bare minimum dependencies too so you don't have to worry about installion. You can just focus on writing your code for the action.

That's all 🦄 🦄 🦄

If you want to contribute to the project you can do that too. You can also leave star ⚡ if you find this tool helpful that helps on keeping me motivated to keep creating these types of tools and modules.

Top comments (0)

typescript

11 Tips That Make You a Better Typescript Programmer

1 Think in {Set}

Type is an everyday concept to programmers, but it’s surprisingly difficult to define it succinctly. I find it helpful to use Set as a conceptual model instead.

#2 Understand declared type and narrowed type

One extremely powerful typescript feature is automatic type narrowing based on control flow. This means a variable has two types associated with it at any specific point of code location: a declaration type and a narrowed type.

#3 Use discriminated union instead of optional fields

...

Read the whole post now!

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay