diff --git a/actions/detect-package-metadata/action.yml b/actions/detect-package-metadata/action.yml index 7bb0db1..e4f49fd 100644 --- a/actions/detect-package-metadata/action.yml +++ b/actions/detect-package-metadata/action.yml @@ -3,6 +3,8 @@ name: "Detect build scripts" outputs: name: value: ${{ steps.detect_scripts.outputs.name }} + pack-name: + value: ${{ steps.detect_scripts.outputs.pack-name }} version: value: ${{ steps.detect_scripts.outputs.version }} scripts: @@ -29,6 +31,7 @@ runs: const packageInfo = require(packageInfoPath); core.setOutput('name', packageInfo.name); + core.setOutput('pack-name', packageInfo.name.replace(/\//g, '-')); core.setOutput('version', packageInfo.version); core.setOutput('scripts', Object.keys(packageInfo.scripts).filter(script => script.startsWith('build'))) diff --git a/actions/load-artifacts-npm/action.yml b/actions/load-artifacts-npm/action.yml index f39242e..20bdff5 100644 --- a/actions/load-artifacts-npm/action.yml +++ b/actions/load-artifacts-npm/action.yml @@ -11,7 +11,7 @@ runs: name: npm - shell: bash - run: tar --strip-components=1 -xzf '${{ format('.builds/{0}-{1}.tgz', steps.detect-package-metadata.outputs.name, steps.detect-package-metadata.outputs.version) }}' + run: tar --strip-components=1 -xzf '${{ format('.builds/{0}-{1}.tgz', steps.detect-package-metadata.outputs.pack-name, steps.detect-package-metadata.outputs.version) }}' - uses: actions/github-script@v6 with: @@ -19,5 +19,5 @@ runs: const workspaces = JSON.parse(${{ toJSON(steps.detect-package-metadata.outputs.workspaces) }}); for (const workspace of workspaces) - await exec.exec(`tar --strip-components=1 -C ${workspace.path} -xzf .builds/${workspace.name.replace(/\//g, '-')}-${workspace.version}.tgz`) + await exec.exec(`tar --strip-components=1 -C ${workspace.path} -xzf .builds/${workspace.name}-${workspace.version}.tgz`)