Skip to content

Commit aa49dfd

Browse files
committed
add fix for artifact debug
1 parent daa6a94 commit aa49dfd

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

browserstack-report-action/dist/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41959,11 +41959,13 @@ class ArtifactManager {
4195941959
return `File saved locally at: ${filePath}`;
4196041960
}
4196141961
const artifactName = `browserstack`;
41962-
const relativeFilePath = path.relative(artifactDir, filePath);
41962+
const cwdPath = path.join(process.cwd(), 'report.html');
41963+
fs.copyFileSync(filePath, cwdPath);
41964+
core.info(`Copied report to ${cwdPath}`);
4196341965
const uploadResult = await artifactClient.uploadArtifact(
4196441966
artifactName,
41965-
[relativeFilePath],
41966-
artifactDir,
41967+
[fileName],
41968+
process.cwd(),
4196741969
{ continueOnError: true }
4196841970
);
4196941971

browserstack-report-action/src/utils/ArtifactManager.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ class ArtifactManager {
4949
return `File saved locally at: ${filePath}`;
5050
}
5151
const artifactName = `browserstack`;
52-
const relativeFilePath = path.relative(artifactDir, filePath);
52+
const cwdPath = path.join(process.cwd(), 'report.html');
53+
fs.copyFileSync(filePath, cwdPath);
54+
core.info(`Copied report to ${cwdPath}`);
5355
const uploadResult = await artifactClient.uploadArtifact(
5456
artifactName,
55-
[relativeFilePath],
56-
artifactDir,
57+
[fileName],
58+
process.cwd(),
5759
{ continueOnError: true }
5860
);
5961

0 commit comments

Comments
 (0)