diff --git a/action.yml b/action.yml index 2080787..31950c9 100644 --- a/action.yml +++ b/action.yml @@ -172,6 +172,9 @@ runs: }); console.log('Adding file:', manifestPath); + const distPath = '${{ github.workspace }}/dist/' + const relativePath = path.relative('.', distPath + 'index.js'); + console.log('Adding file:', relativePath); const newTree = await octokit.rest.git.createTree({ owner, repo, @@ -183,19 +186,12 @@ runs: type: 'blob', content: fs.readFileSync(manifestPath, 'utf8'), }, - ...fs.readdirSync('${{ github.workspace }}/dist').map((file) => { - const relativePath = path.relative('.', '${{ github.workspace }}/dist/' + file); - console.log('Adding file:', '${{ github.workspace }}/dist/' + file); - return { - path: relativePath, - mode: '100644', - type: 'blob', - content: fs.readFileSync( - '${{ github.workspace }}/dist/' + file, - 'utf-8', - ), - }; - }), + { + path: distPath, + mode: '100644', + type: 'blob', + content: fs.readFileSync(relativePath, 'utf8'), + }, ], });