Skip to content

Improve naming of Windows release asset#207

Merged
mislav merged 5 commits intomasterfrom
tweak-windows-build
Jan 10, 2020
Merged

Improve naming of Windows release asset#207
mislav merged 5 commits intomasterfrom
tweak-windows-build

Conversation

@mislav
Copy link
Copy Markdown
Contributor

@mislav mislav commented Jan 9, 2020

Problems:

  • The attached MSI installer is called simply "gh.msi", which doesn't follow the naming pattern of downloads for other platforms;
  • The unsigned gh_{version}_windows_amd64.exe that was used to generate the MSI installer remains among release assets after the MSI has been uploaded.

This PR:

  • Ensures that the MSI installer is attached with the name gh_{version}_windows_amd64.msi;
  • Deletes the .exe after uploading the .msi;
  • Adds npm run build task to JS actions to facilitate rebuilding of dist/index.js after changes.

Followup to #148, #201

const assetFile = fs.readFileSync(MSI_PATH);

await uploadAsset(GITHUB_TOKEN, release, assetFile);
const assetFile = fs.createReadStream(MSI_PATH);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This switches to a read stream for the file upload to avoid loading the whole binary file contents to memory

const octokit = new github.GitHub(token);
/**
* @param {github.GitHub} octokit
* @param {Octokit.ReposGetReleaseByTagResponse} release
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These @param statements are JSDoc syntax which help VS Code (and TypeScript compiler when used for .js files) follow argument types across function calls. This is only useful for editor features such as autocompletion

@mislav mislav merged commit f401ec5 into master Jan 10, 2020
@mislav mislav deleted the tweak-windows-build branch January 10, 2020 10:54
mislav added a commit that referenced this pull request Jan 23, 2020
Improve naming of Windows release asset
Stonre pushed a commit to Stonre/strands-fork that referenced this pull request Jul 21, 2025
cchristous pushed a commit to cchristous/cli that referenced this pull request Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants