File tree Expand file tree Collapse file tree 4 files changed +23
-11
lines changed Expand file tree Collapse file tree 4 files changed +23
-11
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,10 @@ See the [official Github documentation][pat-docs] to learn more about Personal A
5454
5555### 6. Build  
5656
57- 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:
57+ It is necessary to compile the code before it can be used by GitHub Actions. Remember to run this  commands before committing any code changes:
5858
5959``` 
60- npm run build 
61- npm run pack 
60+ task build 
6261``` 
6362
6463### 7. Commit  
Original file line number Diff line number Diff line change @@ -35,13 +35,14 @@ jobs:
3535        with :
3636          node-version-file : package.json 
3737
38-       - name : Install dependencies 
39-         run : npm install 
38+       - name : Install Task 
39+         uses : arduino/setup-task@v2 
40+         with :
41+           repo-token : ${{ secrets.GITHUB_TOKEN }} 
42+           version : 3.x 
4043
41-       - name : Build project 
42-         run : | 
43-           npm run-script build 
44-           npm run-script pack 
44+       - name : Build action 
45+         run : task ts:build 
4546
4647      - name : Check packaging 
4748        #  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 66  DEFAULT_NPM_PROJECT_PATH : ./ 
77
88tasks :
9+   build :
10+     desc : Build the project 
11+     deps :
12+       - task : ts:build 
13+ 
914  check :
1015    desc : Check for problems with the project 
1116    deps :
1621    deps :
1722      - task : general:format-prettier 
1823      - task : npm:install-deps 
24+       - task : ts:build 
1925
2026  #  Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-prettier-formatting-task/Taskfile.yml
2127  general:format-prettier :
@@ -117,6 +123,14 @@ tasks:
117123            -r "{{.STYLELINTRC_SCHEMA_PATH}}" \ 
118124            -d "{{.INSTANCE_PATH}}" 
119125
126+    ts:build :
127+     desc : Build the action's TypeScript code. 
128+     deps :
129+       - task : npm:install-deps 
130+     cmds :
131+       - npx tsc 
132+       - npx ncc build 
133+ 
120134  #  Make a temporary file named according to the passed TEMPLATE variable and print the path passed to stdout
121135  #  Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/windows-task/Taskfile.yml
122136  utility:mktemp-file :
Original file line number Diff line number Diff line change 44  "description" : " Check Arduino projects for problems"  ,
55  "main" : " lib/main.js"  ,
66  "scripts" : {
7-     "build" : " tsc"  ,
8-     "pack" : " ncc build"  ,
97    "test" : " jest" 
108  },
119  "repository" : {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments