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
master
branch would only include the code for the latest release version ofcloc
release-vX.XX
and named after the next stable release (ex here :release-v2.06
)master
would need to be created with the labelrelease-ready
cloc
andUnix/cloc
, no need to do it manually.exe
in 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).exe
to VirusTotal for analysis and grabs the URL.exe
and VT URL in a PR comment (useful for checks)README.md
with new version in the badge, commands, references to files and adds the VT analysis and the release dateUnix/NEWS
file with the body of the PR (contains release notes) and formats them according to older news entries.exe
from 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/apikey
release-ready
(check https://github.com/AlDanial/cloc/labels)Last notes and caveats
Note that out of the 2 used endpoints (
file_upload
andanalyses
), only the first one counts towards the quotarelease-vX.XX
branch and remove/re-add therelease-ready
label.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/NEWS
file 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_staging
one, with a branch ruleset onmaster
that 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.