feat: implement #890 and definitely solve #849 #891
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on the plan I wrote at #849 (comment) with a few tweaks
Proposed workflow moving forward
masterbranch would only include the code for the latest release version ofclocrelease-vX.XXand named after the next stable release (ex here :release-v2.06)masterwould need to be created with the labelrelease-readyclocandUnix/cloc, no need to do it manually.exein a neutral environment (fixes [BUG] cloc won't work if ran through a symlink on Windows (ex Winget) :Can't locate PAR.pm in @INC#849).exeto VirusTotal for analysis and grabs the URL.exeand VT URL in a PR comment (useful for checks)README.mdwith new version in the badge, commands, references to files and adds the VT analysis and the release dateUnix/NEWSfile with the body of the PR (contains release notes) and formats them according to older news entries.exefrom the latest matching PR commentRequirements
VIRUSTOTAL_API_KEY(check https://github.com/AlDanial/cloc/settings/secrets/actions/new), API key available athttps://www.virustotal.com/gui/user/USERNAME/apikeyrelease-ready(check https://github.com/AlDanial/cloc/labels)Last notes and caveats
Note that out of the 2 used endpoints (
file_uploadandanalyses), only the first one counts towards the quotarelease-vX.XXbranch and remove/re-add therelease-readylabel.The action will re-run with the latest code changes, and the second action is made to retrieve the last PR comment matching the patterns
*,`,_) will be stripped from theUnix/NEWSfile for PowerShell syntax reasons and to match the formatting of older entries.This means that "
VIRUSTOTAL_API_KEY" will be rendered as "VIRUSTOTALAPIKEY".Previous releases don't have any of these 3 characters but it's something to keep in mind.
.exe) are retained for 90 days by default (maximum value), which is more than enoughWe could go over-the-top and add another action triggered by the
release_stagingone, with a branch ruleset onmasterthat checks for this specific action success, but it's maybe too much.So keep in mind that merging the PR before the first action finished to run will break the functioning of the second one.
The PR comment + commit with the changes is the thing to wait for.
Although it is a proposed solution, it may not be definitive nor tailored to your needs, so tell me if this needs changes.