Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New release script for individual binary installs #1125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

porsager
Copy link

@porsager porsager commented Oct 25, 2024

This release.yml script makes a release with the version specified when running it.

It lets package managers only download the binary that they need.

You do a release by triggering the workflow under the actions tab like shown below.

Only harm done if anything goes wrong is a lot of tags you need to delete (one for the main pkg and one for each binary).

The version must be without a v prefix, so eg. the next version should be 20.50.0. You can also try it out with prereleases and delete the tags afterwards - eg 20.50.0-test and then install with npm i uNetworking/uWebSockets.js#v20.50.0-test

uws-release.mp4

@@ -13,7 +13,7 @@ jobs:
- name: Update binaries
run: |
$ErrorActionPreference = 'SilentlyContinue'
git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
git clone --recursive https://github.com/${{ github.repository }}.git
Copy link
Author

Choose a reason for hiding this comment

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

This was easier for when testing on my fork, but let me know if I should revert this and the others

Copy link
Contributor

Choose a reason for hiding this comment

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

If it works this is better

Copy link
Author

Choose a reason for hiding this comment

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

Should be just fine 👍

@@ -17,7 +17,7 @@

module.exports = (() => {
try {
return require('./uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules + '.node');
return require('@uws/uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules);
Copy link
Author

Choose a reason for hiding this comment

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

This is actually not important as it's the uws.js on the binaries branch that we use, but it felt weird to have an outdated version here.

git add -A
git commit -m "Released @uws/$binary with version $version"
git tag "v${version}-$binary"
git push "https://x-access-token:${{ secrets.SECRET }}@github.com/${{ github.repository }}" "v${version}-$binary"
Copy link
Author

Choose a reason for hiding this comment

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

You might need to change the username from x-access-token here back to unetworkingab - let me know if I should do that, or we can see if it's fine when you do a test release

@uNetworkingAB
Copy link
Contributor

Holy shit this looks great, I need to process this for a while

@porsager
Copy link
Author

Glad to hear - You might have an opinion on the naming for the binary specific subpackages. I went with a @uws/ prefix, but we could easily leave out the "@scope" style and do a uWebSockets.js- prefix instead.

Here's the difference as examples

  • current: @uws/uws_win32_x64_131
  • alternative uWebSockets.js-uws_win32_x64_131

We can also get rid of the uws_ part in the name as it feels redundant, but keeping the name the same as the binaries made the implementation a little cleaner.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants