File tree 5 files changed +22
-8
lines changed 5 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,7 @@ npm run test
44
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:
45
45
46
46
```
47
- npm run build
48
- npm run pack
47
+ task build
49
48
```
50
49
51
50
### 7. Commit
Original file line number Diff line number Diff line change @@ -39,12 +39,14 @@ jobs:
39
39
with :
40
40
node-version : ${{ env.NODE_VERSION }}
41
41
42
- - name : Install dependencies
43
- run : npm install
42
+ - name : Install Task
43
+ uses : arduino/setup-task@v1
44
+ with :
45
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
46
+ version : 3.x
44
47
45
48
- name : Build project
46
- run : |
47
- npm run build
49
+ run : task ts:build
48
50
49
51
- name : Check packaging
50
52
# Ignoring CR because ncc's output has a mixture of line endings, while the repository should only contain
Original file line number Diff line number Diff line change 10
10
[ ![ Check npm status] ( https://github.com/arduino/setup-protoc/actions/workflows/check-npm-task.yml/badge.svg )] ( https://github.com/arduino/setup-protoc/actions/workflows/check-npm-task.yml )
11
11
[ ![ Check TypeScript status] ( https://github.com/arduino/setup-protoc/actions/workflows/check-typescript-task.yml/badge.svg )] ( https://github.com/arduino/setup-protoc/actions/workflows/check-typescript-task.yml )
12
12
[ ![ Check tsconfig status] ( https://github.com/arduino/setup-protoc/actions/workflows/check-tsconfig-task.yml/badge.svg )] ( https://github.com/arduino/setup-protoc/actions/workflows/check-tsconfig-task.yml )
13
- [ ![ Check Packaging status] ( https://github.com/arduino/setup-protoc/actions/workflows/check-packaging-ncc-typescript-npm .yml/badge.svg )] ( https://github.com/arduino/setup-protoc/actions/workflows/check-packaging-ncc-typescript-npm .yml )
13
+ [ ![ Check Packaging status] ( https://github.com/arduino/setup-protoc/actions/workflows/check-packaging-ncc-typescript-task .yml/badge.svg )] ( https://github.com/arduino/setup-protoc/actions/workflows/check-packaging-ncc-typescript-task .yml )
14
14
15
15
This action makes the ` protoc ` compiler available to Workflows.
16
16
Original file line number Diff line number Diff line change 6
6
SCHEMA_DRAFT_4_AJV_CLI_VERSION : 3.3.0
7
7
8
8
tasks :
9
+ build :
10
+ desc : Build the project
11
+ deps :
12
+ - task : ts:build
13
+
9
14
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-npm-dependencies-task/Taskfile.yml
10
15
general:prepare-deps :
11
16
desc : Prepare project dependencies for license check
@@ -260,6 +265,15 @@ tasks:
260
265
else
261
266
echo "{{.RAW_PATH}}"
262
267
fi
268
+
269
+ ts:build :
270
+ desc : Build the action's TypeScript code.
271
+ deps :
272
+ - task : npm:install-deps
273
+ cmds :
274
+ - npx tsc
275
+ - npx ncc build
276
+
263
277
ts:lint :
264
278
desc : Lint TypeScript code
265
279
deps :
Original file line number Diff line number Diff line change 5
5
"description" : " Setup protoc action" ,
6
6
"main" : " lib/main.js" ,
7
7
"scripts" : {
8
- "build" : " tsc && ncc build" ,
9
8
"format" : " prettier --write **/*.ts" ,
10
9
"format-check" : " prettier --check **/*.ts" ,
11
10
"test" : " jest"
You can’t perform that action at this time.
0 commit comments