Skip to content

Commit

Permalink
Restore file uploader.Some platforms have different behaviours.(Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Nov 8, 2023
1 parent 8f54aed commit 71380e7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Mark and close stale issues"
on:
schedule:
- cron: "30 2 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
stale-issue-message: "This issue was marked as stale due to lack of activity."
days-before-issue-stale: 90
exempt-issue-labels: "do-not-stale"
6 changes: 2 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39219,9 +39219,7 @@ async function run() {
*/
const find_mime = lite_1.default.getType(path.extname(file_path));
const file_length = fs.statSync(file_path).size;
/*const file_data: any = fs.createReadStream(
file_path
); /* await readableToString(
const file_data = fs.createReadStream(file_path); /* await readableToString(
fs.createReadStream(file_path)
);*/
const request_params = {
Expand All @@ -39234,7 +39232,7 @@ async function run() {
// "content-length": file_data.length, // file_size,
},
name: file_base_name,
data: `@${file_path}`,
data: file_data,
};
if (is_verbose) {
console.log(`${retry_msg}uploadReleaseAsset with length: ${file_length}`);
Expand Down
6 changes: 2 additions & 4 deletions lib/index.js.map

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "upload-to-github-release",
"version": "1.4.0",
"version": "1.4.1",
"description": "Github Action to deploy files to github release",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ async function run() {

const find_mime = mime.getType(path.extname(file_path));
const file_length = fs.statSync(file_path).size;
/*const file_data: any = fs.createReadStream(
const file_data: any = fs.createReadStream(
file_path
); /* await readableToString(
fs.createReadStream(file_path)
Expand All @@ -742,7 +742,7 @@ async function run() {
// "content-length": file_data.length, // file_size,
},
name: file_base_name,
data: `@${file_path}`,
data: file_data,
};
if (is_verbose) {
console.log(
Expand Down

0 comments on commit 71380e7

Please sign in to comment.