Skip to content

Commit 7f329a2

Browse files
Use ncc to package the action
1 parent f9aa72c commit 7f329a2

File tree

190 files changed

+5147
-14051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+5147
-14051
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,11 @@ npm run test
4141

4242
### 6. Build
4343

44-
It is necessary to compile the code before it can be used by GitHub Actions. 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`.
45-
Remember to run these commands before committing any code changes:
44+
It is necessary to compile the code before it can be used by GitHub Actions. Remember to run these commands before committing any code changes:
4645

4746
```
4847
npm run build
49-
```
50-
51-
remove all the dependencies:
52-
53-
```
54-
rm -rf node_modules
55-
```
56-
57-
add back **only** the runtime dependencies:
58-
59-
```
60-
npm install --production
61-
```
62-
63-
check in the code that matters:
64-
65-
```
66-
git add lib node_modules
48+
npm run pack
6749
```
6850

6951
### 7. Commit

.github/workflows/check-packaging-ncc-typescript-npm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ jobs:
4545
- name: Build project
4646
run: |
4747
npm run build
48+
npm run pack
4849
4950
- name: Check packaging
5051
# Ignoring CR because ncc's output has a mixture of line endings, while the repository should only contain
5152
# Unix-style EOL.
52-
run: git diff --ignore-cr-at-eol --color --exit-code lib
53+
run: git diff --ignore-cr-at-eol --color --exit-code dist

.gitignore

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

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ inputs:
1313
default: ''
1414
runs:
1515
using: 'node16'
16-
main: 'lib/main.js'
16+
main: 'dist/index.js'
1717
branding:
1818
icon: 'box'
1919
color: 'green'

0 commit comments

Comments
 (0)