This directory contains tools to automate the posting of release news to the aboutcode.org website.
generate_release_post.py: A Python script that generates a formatted ReStructuredText (RST) file for the news section.release-workflow-template.yml: A GitHub Actions workflow template that can be used in AboutCode projects (like ScanCode, VulnerableCode) to automatically trigger this process on release.
You can use the script locally to generate a news file:
python3 generate_release_post.py \
--project "ScanCode Toolkit" \
--version "32.0.1" \
--url "https://github.com/aboutcode-org/scancode-toolkit/releases/tag/v32.0.1" \
--output-dir "output"This will create a file like 2023-10-27-scancode-toolkit-v32.0.1-released.rst in the output directory.
To automate this for a project:
- Copy
release-workflow-template.ymlto the project's.github/workflows/directory. - Update the
PROJECT_NAMEenvironment variable in the workflow file. - Configure the
create-pull-requeststep to point to the correctaboutcode.orgsource repository (if different from the current one) and ensure aBOT_TOKENwith sufficient permissions is available in the repository secrets.
- Python 3.6+
- No external dependencies for the script (uses standard library).