Skip to content

Change dependencies management #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Dependency directory
node_modules/

# Ignore built ts files
__tests__/runner/*
lib/**/*
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you want to pin a major or minor version you can use the `.x` wildcard:
- name: Install Arduino CLI
uses: arduino/setup-arduino-cli@v1.0.0
with:
version: '0.x'
version: "0.x"
```

To pin the exact version:
Expand All @@ -28,7 +28,7 @@ To pin the exact version:
- name: Install Arduino CLI
uses: arduino/setup-arduino-cli@v1.0.0
with:
version: '0.5.0'
version: "0.5.0"
```

## Development
Expand All @@ -47,15 +47,9 @@ To run the tests:

## 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:

1. `npm install` to add all the dependencies, included development.
1. `npm run test` to see everything works as expected.
1. `npm 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. open a PR and request a review.
2. `npm run build` to build the Action under the `./lib` folder.
3. `npm run test` to see everything works as expected.
4. `npm run pack` to package for distribution
5. `git add src dist` to check in the code that matters.
6. open a PR and request a review.
18 changes: 9 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: 'Setup Arduino CLI'
description: 'Download Arduino CLI and add it to the PATH'
author: 'Arduino'
name: "Setup Arduino CLI"
description: "Download Arduino CLI and add it to the PATH"
author: "Arduino"
inputs:
version:
description: 'Version to use. Example: 0.5.0'
default: '0.x'
description: "Version to use. Example: 0.5.0"
default: "0.x"
runs:
using: 'node12'
main: 'lib/main.js'
using: "node12"
main: "dist/index.js"
branding:
icon: 'box'
color: 'green'
icon: "box"
color: "green"
Loading