-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for ignoring flush on dispose (#366)
- Loading branch information
1 parent
faa2df8
commit e40602a
Showing
30 changed files
with
635 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const fs = require("fs").promises; | ||
const path = require("path"); | ||
|
||
const ARTIFACTS_PATH = "./artifacts"; | ||
|
||
const createRelease = async ({github, context}) => { | ||
const owner = context.repo.owner; | ||
const repo = context.repo.repo; | ||
const tag_name = context.ref.replace(/refs\/tags\//, ''); | ||
|
||
const res = await github.rest.repos.createRelease({ | ||
owner, | ||
repo, | ||
tag_name, | ||
name: "Release " + tag_name, | ||
body: "TODO", | ||
draft: true, | ||
}); | ||
|
||
const artifacts = await fs.readdir(ARTIFACTS_PATH); | ||
|
||
for (let artifact of artifacts) { | ||
const artifactPath = path.join(ARTIFACTS_PATH, artifact); | ||
const data = await fs.readFile(artifactPath); | ||
|
||
await github.rest.repos.uploadReleaseAsset({ | ||
owner, | ||
repo, | ||
release_id: res.data.id, | ||
name: artifact, | ||
data | ||
}); | ||
} | ||
} | ||
|
||
module.exports = createRelease; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.