JasonEtco / build-and-tag-action

📦🔖 A GitHub Action for publishing JavaScript Actions
MIT License
92 stars 38 forks source link

Add example `package.json` #11

Closed mheap closed 3 years ago

mheap commented 3 years ago

It took me longer to figure out how to use this action than I'd have liked, so here's a docs PR! I believe the minimal package.json example will work for most people writing node actions.

One thing that caught me out is that any actions using build-and-tag-action currently won't work on their main branch as using in action.yml is set to node12 but a compiled file does not exist in the repo.

npx convert-action rewrites the runs section in action.yml, allowing people to specify using: docker in their action.yml file on main (which enables people to use the bleeding edge if required) knowing that when npm run build is executed, runs will be changed to node12

For an example of this working, see the actions run and resulting tag commit