danger / danger-js

⚠️ Stop saying "you forgot to …" in code review
http://danger.systems/js/
MIT License
5.26k stars 368 forks source link

Support arm64 binary generation #1342

Closed pepix closed 1 year ago

pepix commented 1 year ago

What was the problem?

Before fix

error

What I did

After fix

pass

Benefit

Next actions

orta commented 1 year ago

Nice thinking!

The deploy process handles the homebrew-tap here: https://github.com/danger/danger-js/blob/main/scripts/create-homebrew-tap-pr.sh

And https://github.com/danger/danger-js/blob/main/.release-it.json#L9 will need to be tweaked to generate both

That should be it though IMO

pepix commented 1 year ago

Hello! @orta Before updating, I realized it seems only arm64 mac can make package for both architectures. However x64 mac cannot. I'm not very sure current release operation though, are you sure release operator have arm64 mac or release pipeline can build for both? If no, we have to prepare workaround before merge. Updating GitHub Actions could be enough I believe.

pepix commented 1 year ago

Hi! @orta I've added a new GitHub workflow to build packages for all macOS architectures on cloud. Once you setup SSH keys, only one command delivers new release even you don't have arm64 mac.

Any feedbacks and opinions are welcome :)

orta commented 1 year ago

Alright, well this looks great to me - I was a little wary because ~250 people have write access to the org, but they already have write access to the homebrew parts of it anyway and so changing just this part of the process doesn't actually change anything fundementally.

So, I've given it all a once over and it looks good to me - later this evening I'll try ship the latest build of danger with it- thanks!

orta commented 1 year ago

OK, so there's a lot going on here - I'm going to need to tweak this a bit to let the npm parts of the process work locally (because I don't want everyone having access to deploy to npm) on my device, and then the github release + homebrew stuff happen in GH actions

orta commented 1 year ago

That said, thanks a lot - this must have been quite time consuming, and probably required learning a bunch of new things!

orta commented 1 year ago

Alright, I've got this process up and running:

It looks correct to me!

orta commented 1 year ago

Thanks! I was keeping an intel mac around (I use linux as my main daily machine) specifically for Danger deploys, this means a deploy for me is now trivial and doesn't require pulling out an old computer and doing a bunch of work.

pepix commented 1 year ago

I'm glad that I could alleviate your loads by my commit. Thank you for supporting npm part and others. :)

Now I confirmed brew install danger/tap/danger-swift and danger-swift pr https://github.com/danger/swift/pull/146 works without error on M1 mac.