Skip to content

Commit

Permalink
Patch path for globby.(Fixes #44)
Browse files Browse the repository at this point in the history
Signed-off-by: owent <[email protected]>
  • Loading branch information
owent committed Feb 10, 2023
1 parent 048cadd commit bb42894
Show file tree
Hide file tree
Showing 5 changed files with 683 additions and 598 deletions.
6 changes: 4 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20674,7 +20674,9 @@ function getInputAsInteger(name) {
async function run() {
try {
const github_token = (process.env["GITHUB_TOKEN"] || "").trim();
const upload_files_pattern = getInputAsArray("file");
const upload_files_pattern = getInputAsArray("file").map((path) => {
return path.replace('\\', '/');
});
const delete_files_pattern = getInputAsArray("delete_file");
const is_overwrite = getInputAsBool("overwrite");
let is_draft = getInputAsBool("draft", true);
Expand Down Expand Up @@ -21466,7 +21468,7 @@ const getIsIgnoredPredicate = (files, cwd) => {
return fileOrDirectory => {
fileOrDirectory = toPath(fileOrDirectory);
fileOrDirectory = toRelativePath(fileOrDirectory, cwd);
return ignores.ignores(slash(fileOrDirectory));
return fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false;
};
};

Expand Down
6 changes: 4 additions & 2 deletions lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "upload-to-github-release",
"version": "1.3.9",
"version": "1.3.10",
"description": "Github Action to deploy files to github release",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -30,20 +30,20 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"globby": "^13.1.2",
"globby": "^13.1.3",
"micromatch": "^4.0.5",
"mime": "^3.0.0",
"string-env-interpolation": "^1.0.1",
"type-fest": "^3.2.0"
"type-fest": "^3.5.7"
},
"devDependencies": {
"@types/jest": "^29.2.2",
"@types/node": "^18.11.9",
"@vercel/ncc": "^0.34.0",
"jest": "^29.3.1",
"jest-circus": "^29.3.1",
"ts-jest": "^29.0.3",
"typescript": "^4.8.4",
"npm-check-updates": "^16.3.18"
"@types/jest": "^29.4.0",
"@types/node": "^18.13.0",
"@vercel/ncc": "^0.36.1",
"jest": "^29.4.2",
"jest-circus": "^29.4.2",
"ts-jest": "^29.0.5",
"typescript": "^4.9.5",
"npm-check-updates": "^16.7.4"
}
}
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export { getInputAsArray, getInputAsBool, getInputAsString };
async function run() {
try {
const github_token = (process.env["GITHUB_TOKEN"] || "").trim();
const upload_files_pattern = getInputAsArray("file");
const upload_files_pattern = getInputAsArray("file").map((path: string) => {
return path.replace('\\', '/');
});
const delete_files_pattern = getInputAsArray("delete_file");
const is_overwrite = getInputAsBool("overwrite");
let is_draft = getInputAsBool("draft", true);
Expand Down
Loading

0 comments on commit bb42894

Please sign in to comment.