Skip to content

Commit

Permalink
Use ncc to compile action
Browse files Browse the repository at this point in the history
This allows the node_modules to be removed from the repository, as is already done in the `arduino/setup-arduino-cli`,
`arduino/arduino-lint-action`, and `arduino/create-changelog` actions.
  • Loading branch information
per1234 committed May 4, 2021
1 parent 85ad4dc commit 85dca39
Show file tree
Hide file tree
Showing 190 changed files with 5,060 additions and 14,292 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Dependency directory
node_modules/

# Ignore built ts files
__tests__/runner/*
lib/**/*
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,11 @@ See [step-debug-logs](https://github.com/actions/toolkit/blob/master/docs/action

## Release

We check in the `node_modules` to provide runtime dependencies to the system
using the Action, so be careful not to `git add` all the development dependencies
you might have under your local `node_modules`. To release a new version of the
Action the workflow should be the following:
To release a new version of the Action the workflow should be the following:

1. `npm install` to add all the dependencies, included development.
1. `npm install` to install the dependencies.
1. `npm run test` to see everything works as expected.
1. `npm run build` to build the Action under the `./lib` folder.
1. `rm -rf node_modules` to remove all the dependencies.
1. `npm install --production` to add back **only** the runtime dependencies.
1. `git add lib node_modules` to check in the code that matters.
1. `npm run pack` to package for distribution
1. `git add src dist` to check in the code that matters.
1. open a PR and request a review.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ inputs:

runs:
using: 'node12'
main: 'lib/main.js'
main: "dist/index.js"
Loading

0 comments on commit 85dca39

Please sign in to comment.