Skip to content

Commit f6baa30

Browse files
committed
feat: add missing build
1 parent 3bc447c commit f6baa30

7 files changed

Lines changed: 39207 additions & 4 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules/
22
*.log
33
.DS_Store
4-
package-lock.json

.releaserc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ plugins:
1010
- - '@semantic-release/git'
1111
- assets:
1212
- package.json
13+
- package-lock.json
1314
- CHANGELOG.md
15+
- dist/**/*
1416
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
1517
- '@semantic-release/github'

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,32 @@ The action automatically creates the following labels:
122122

123123
```bash
124124
npm install
125+
npm run build
125126
```
126127

128+
### Building
129+
130+
The action uses [@vercel/ncc](https://github.com/vercel/ncc) to compile the code and dependencies into a single file. This eliminates the need to commit `node_modules`.
131+
132+
```bash
133+
npm run build
134+
```
135+
136+
This creates a `dist/index.js` file that includes all dependencies bundled together.
137+
127138
### File Structure
128139

129140
```
130141
github-custom-action-examples/
131-
├── action.yml # Action metadata
132-
├── index.js # Main logic
142+
├── action.yml # Action metadata (points to dist/index.js)
143+
├── index.js # Main logic (source)
144+
├── dist/
145+
│ └── index.js # Bundled code with dependencies (commit this!)
133146
├── package.json # Dependencies
134147
├── README.md # Documentation
135148
└── .github/
136149
└── workflows/
150+
├── release.yml # Semantic Release workflow
137151
├── pr-size-check.yml # Local usage example
138152
└── pr-size-check-external.yml # External usage example
139153
```

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ outputs:
3535

3636
runs:
3737
using: 'node20'
38-
main: 'index.js'
38+
main: 'dist/index.js'

0 commit comments

Comments
 (0)