cloc icon indicating copy to clipboard operation
cloc copied to clipboard

create Windows executable via Github Actions

Open AlDanial opened this issue 9 months ago • 3 comments

Ref problems with getting the Windows exe of cloc to work with winget (#849), create the Windows exe with Github Actions rather than on personal Window 11 laptop.

AlDanial avatar Feb 13 '25 04:02 AlDanial

i finished my proposed implementation, will open a PR with details soon

EDM115 avatar Feb 14 '25 17:02 EDM115

Heads up: the time is nearing for a new release so I'll finally put this in motion. Should happen before the end of June.

AlDanial avatar Jun 06 '25 17:06 AlDanial

if you need anything regarding the setup or if you need tweaks, don't hesitate to ping me !

EDM115 avatar Jun 06 '25 17:06 EDM115

Are you able to view https://github.com/AlDanial/cloc/actions/runs/15810264520/job/44560625591#step:5:27 ? The create_release job failed at "Get artifact URL".

AlDanial avatar Jun 22 '25 20:06 AlDanial

hmm here's a checklist of what could have gone wrong :

  • [x] branch name : it followed the release-vX.XX scheme so it's all good
  • [ ] label : the label release-ready isn't present on the repo. the current implementation requires this label to be added to the PR once ready and then the build step will be triggered. a few seconds after the comment with the virustotal URL is made on the PR then it's good to merge
  • [ ] secret : i do not know if you did add the VIRUSTOTAL_API_KEY secret to the repo, cf the "Required" part in #891

also a few other notes :
the action does take care of editing the my $VERSION part in the code, as well as adding the changelog in Unix/NEWS, however in the PR body the dash symbol (-) can be used in place of the o to keep the formatting consistent (see .github/workflows/release-staging.yml#L152), as in EDM115/cloc-actions#20

EDM115 avatar Jun 26 '25 12:06 EDM115

@AlDanial btw I finally got to know why I had this issue and you never encountered it :
the behavior described in https://github.com/AlDanial/cloc/issues/849#issuecomment-2301993628 only applies when Developer mode is enabled on the Windows settings. What does it changes ?

  • ✅ Enabled : WinGet only adds %LOCALAPPDATA%\Microsoft\WinGet\Links to the PATH and create symlinks for each portable app
  • ❌ Disabled : Winget adds every single portable app's path individually to the PATH (ex : %LOCALAPPDATA%\Microsoft\WinGet\Packages\AlDanial.Cloc_Microsoft.Winget.Source_8wekyb3d8bbwe)

see microsoft/winget-cli#3498 and microsoft/winget-cli#3437

EDM115 avatar Sep 27 '25 10:09 EDM115

OK! I'll give this another shot at the next release.

AlDanial avatar Oct 03 '25 02:10 AlDanial