Release CI: compute SHA256 of the Windows installer
Problem to solve
When I implemented CI build for windows installer (ci: add windows installer) I didn't realize that goreleaser
uploads the installer artifact, but it doesn't include it in the checksums.txt
Example release: https://gitlab.com/gitlab-org/cli/-/releases/v1.23.1
05c5a52bf492c64360945176ea0b518846e4be1f9d22f659e9c98f155c19c1aa glab_1.23.1_Linux_i386.rpm
07f1e94284f56c467a7d48514879702345e4fcf739ba0935dc13aeac2f2da425 glab_1.23.1_Linux_arm64.deb
091a7e8f08ba8e97eb48329665754f011d52f07e72770aa48fff7617b9c5b996 glab_1.23.1_Linux_x86_64.rpm
11507a39918a2b9681a04c2a312f2f0e72da9e56eaa05934e0555e960e2339b7 glab_1.23.1_Linux_arm.rpm
218425da34bacb2782a9b543c23c8da19d9e6763d6193df1172c78b45d4a487a glab_1.23.1_macOS_x86_64.tar.gz
246b0a9e1879107d433fdae6d9b0e4924be2da0d48a0cd6ec7634eaca992bf74 glab_1.23.1_Windows_i386.zip
2ca2b49bb9c48b5f2be7ebce269b87a5cd16e3a2ba8913df2d38be9485066327 glab_1.23.1_Linux_i386.deb
3287a0368b3c5ab30eab2c5b1ba0b7f46fc61ec9624ec980dda24a632a38f5b1 glab_1.23.1_Linux_arm64.tar.gz
505e0cc8fad046cd201fff1a2eaf5fb8b5fcc85a69ab15016dbb1103c0675f6e glab_1.23.1_Linux_x86_64.apk
7b182abaf663b5fcaece2bafa3718640be5320fa322f11cae140bd9832e93466 glab_1.23.1_Linux_arm.apk
878b3b2b60081c69abf63c9337acacd22d9a7f38dee5cfd57af5b341cbd845e9 glab_1.23.1_Linux_arm64.rpm
89e48f028b72e73a3037ddf57be8f08561b8b147ceb14edf7e4ab4e9baa2e24f glab_1.23.1_Linux_x86_64.tar.gz
9040faa17656930f4531317a07e5b15c7ace545321d192ee766d00b1bad66055 glab_1.23.1_Linux_arm64.apk
907ae5622d6e2b74115b571ef711a118ddf86a305912d7acefb2f86032ae678b glab_1.23.1_Linux_x86_64.deb
af195fdef0ebde08f3bbb2ab21a8763ebb1bbee90b6579165a3bb1fbf27620e5 glab_1.23.1_Windows_x86_64.zip
b4c34a560a22c44cc91ea7276e303479d3bbf7e3c37d2bbbebdae10f0e3abf1f glab_1.23.1_Linux_armv6.tar.gz
c346fb14e4f3bfb5c28a5d93b64507245a10cc21ef261233a58e86f4ce4adfa5 glab_1.23.1_Linux_i386.tar.gz
cb71fbcff921b5a1078564ae93a84e1dc180ee2f9788b9c746872a2f14ada2eb glab_1.23.1_Linux_arm.deb
d42016eb38ef32e653cde1c40a9c8e714dae1e7a3c002bb1486d892cd71c5504 glab_1.23.1_Linux_i386.apk
ffc23d7b898c41d286ba427aa402588547e0a32444828e0dcf947be2911640f8 glab_1.23.1_macOS_arm64.tar.gz
Proposal
Generate the checksum separately and upload it as glab_1.23.1_Windows_x86_64_installer.exe.checksum.txt
or something similar.
Further details
The unix command to generate the SHA256 checksum is sha256sum
, and it's available on the default ubuntu image.