diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c215f85217..d3263e2df6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,22 +20,22 @@ jobs: curr_tag=$(git for-each-ref --sort=creatordate --format '%(refname:lstrip=2)' refs/tags | grep ^r | tail -1) echo "Previous tag: ${prev_tag}" echo "Current tag: ${curr_tag}" - echo "#### New rules:" > changes.txt + echo "### New Rules" > changes.txt git log --pretty=%B ${prev_tag}..${curr_tag} | grep -E '^\s*new: ' | sort | sed -e 's%^% - %' >> changes.txt - echo "#### Changed rules:" >> changes.txt + echo "### Updated Rules" >> changes.txt git log --pretty=%B ${prev_tag}..${curr_tag} | grep -E '^\s*change: ' | sort | sed -e 's%^% - %' >> changes.txt - echo "#### Rules with fixes:" >> changes.txt + echo "### Fixed Rules" >> changes.txt git log --pretty=%B ${prev_tag}..${curr_tag} | grep -E '^\s*fix: ' | sort | sed -e 's%^% - %' >> changes.txt git log --pretty=%B ${prev_tag}..${curr_tag} | grep -oP 'Merge PR #\d+ from \K(@\S+)' | sort -u > authors_raw.txt git log --pretty=%B ${prev_tag}..${curr_tag} | grep -oP "Co-authored-by: \K.*(?= <)" | sort -u | sed -e 's%^%@%' >> authors_raw.txt LC_ALL=en_US.UTF-8 sort -u authors_raw.txt | grep -v 'dependabot\[bot\]' > authors.txt - echo "### Changes in this release:" > changelog.txt cat changes.txt >> changelog.txt echo "" >> changelog.txt - echo "Thanks to $(perl -pe 's%\n%, %' authors.txt | sed 's%, $%%')" >> changelog.txt + echo "### Acknowledgement" >> changelog.txt + echo "Thanks to $(perl -pe 's%\n%, %' authors.txt | sed 's%, $%%') for their contribution to this release" >> changelog.txt echo "" >> changelog.txt echo "" >> changelog.txt - echo "#### Which Sigma rule package should I use?" >> changelog.txt + echo "### Which Sigma rule package should I use?" >> changelog.txt echo "A detailed explanation can be found in the [Releases.md](Releases.md) file. If you are new to Sigma, we recommend starting with the \"Core\" ruleset." >> changelog.txt cat changelog.txt - name: Build all release packages @@ -43,7 +43,7 @@ jobs: python3 tests/sigma-package-release.py --min-status test --min-level high --rule-types generic --outfile sigma-core-${{ github.ref_name }}.zip python3 tests/sigma-package-release.py --min-status test --min-level medium --rule-types generic --outfile sigma-core+-${{ github.ref_name }}.zip python3 tests/sigma-package-release.py --min-status experimental --min-level medium --rule-types generic --outfile sigma-core++-${{ github.ref_name }}.zip - python3 tests/sigma-package-release.py --min-status experimental --min-level high --rule-types et --outfile sigma-et-addon-${{ github.ref_name }}.zip + python3 tests/sigma-package-release.py --min-status experimental --min-level high --rule-types et --outfile sigma-emerging-threats-addon-${{ github.ref_name }}.zip python3 tests/sigma-package-release.py --min-status experimental --min-level high --rule-types generic et --outfile sigma-all-rules-${{ github.ref_name }}.zip - name: Create Release with Assets id: create_release @@ -59,5 +59,5 @@ jobs: sigma-core-${{ github.ref_name }}.zip sigma-core+-${{ github.ref_name }}.zip sigma-core++-${{ github.ref_name }}.zip - sigma-et-addon-${{ github.ref_name }}.zip + sigma-emerging-threats-addon-${{ github.ref_name }}.zip sigma-all-rules-${{ github.ref_name }}.zip diff --git a/tests/sigma-package-release.py b/tests/sigma-package-release.py index 36843bc6b5d..bab05ccdf74 100644 --- a/tests/sigma-package-release.py +++ b/tests/sigma-package-release.py @@ -112,4 +112,4 @@ def main(arguments: list) -> int: print("[I] Written all rules to output ZIP file '{}'".format(args.outfile)) if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) \ No newline at end of file + sys.exit(main(sys.argv[1:]))