Skip to content

Commit 051108c

Browse files
committedJul 30, 2020
Migrate to zeit/ncc for distribution
·
v2.0.0v1.1.0
1 parent b9c72e9 commit 051108c

File tree

10 files changed

+4908
-236
lines changed

10 files changed

+4908
-236
lines changed
 

‎.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# Dependency directory
22
node_modules/
3+
4+
# Ignore built ts files
5+
__tests__/runner/*
6+
lib/**/*

‎README.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you want to pin a major or minor version you can use the `.x` wildcard:
1919
- name: Install Arduino CLI
2020
uses: arduino/setup-arduino-cli@v1.0.0
2121
with:
22-
version: '0.x'
22+
version: "0.x"
2323
```
2424

2525
To pin the exact version:
@@ -28,7 +28,7 @@ To pin the exact version:
2828
- name: Install Arduino CLI
2929
uses: arduino/setup-arduino-cli@v1.0.0
3030
with:
31-
version: '0.5.0'
31+
version: "0.5.0"
3232
```
3333

3434
## Development
@@ -47,15 +47,9 @@ To run the tests:
4747

4848
## Release
4949

50-
We check in the `node_modules` to provide runtime dependencies to the system
51-
using the Action, so be careful not to `git add` all the development dependencies
52-
you might have under your local `node_modules`. To release a new version of the
53-
Action the workflow should be the following:
54-
5550
1. `npm install` to add all the dependencies, included development.
56-
1. `npm run test` to see everything works as expected.
57-
1. `npm build` to build the Action under the `./lib` folder.
58-
1. `rm -rf node_modules` to remove all the dependencies.
59-
1. `npm install --production` to add back **only** the runtime dependencies.
60-
1. `git add lib node_modules` to check in the code that matters.
61-
1. open a PR and request a review.
51+
2. `npm run build` to build the Action under the `./lib` folder.
52+
3. `npm run test` to see everything works as expected.
53+
4. `npm run pack` to package for distribution
54+
5. `git add src dist` to check in the code that matters.
55+
6. open a PR and request a review.

‎action.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: 'Setup Arduino CLI'
2-
description: 'Download Arduino CLI and add it to the PATH'
3-
author: 'Arduino'
1+
name: "Setup Arduino CLI"
2+
description: "Download Arduino CLI and add it to the PATH"
3+
author: "Arduino"
44
inputs:
55
version:
6-
description: 'Version to use. Example: 0.5.0'
7-
default: '0.x'
6+
description: "Version to use. Example: 0.5.0"
7+
default: "0.x"
88
runs:
9-
using: 'node12'
10-
main: 'lib/main.js'
9+
using: "node12"
10+
main: "dist/index.js"
1111
branding:
12-
icon: 'box'
13-
color: 'green'
12+
icon: "box"
13+
color: "green"

‎dist/index.js

Lines changed: 4879 additions & 0 deletions
Large diffs are not rendered by default.

‎dist/unzip

170 KB
Binary file not shown.

‎dist/unzip-darwin

181 KB
Binary file not shown.

‎lib/installer.js

Lines changed: 0 additions & 179 deletions
This file was deleted.

‎lib/main.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

‎package-lock.json

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build": "tsc",
99
"format": "prettier --write **/*.ts",
1010
"format-check": "prettier --check **/*.ts",
11+
"pack": "ncc build",
1112
"test": "jest"
1213
},
1314
"repository": {
@@ -32,6 +33,7 @@
3233
"@types/jest": "^24.0.13",
3334
"@types/node": "^12.0.4",
3435
"@types/semver": "^6.0.0",
36+
"@zeit/ncc": "^0.22.3",
3537
"jest": "^26.1.0",
3638
"jest-circus": "^24.7.1",
3739
"nock": "^10.0.6",

0 commit comments

Comments
 (0)
Please sign in to comment.