Skip to content

Commit c8b68c9

Browse files
authored
Merge pull request #95 from CSA-FEDERATE/Rework_release_workflow
Rework release workflow
2 parents eb43b38 + e8a9525 commit c8b68c9

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/release_workflow.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
with:
1717
ssh-key: ${{ secrets.DEPLOY_KEY }}
1818
ref: main
19+
fetch-depth: 0
1920
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
2021
- name: List files in the repository
2122
run: |
@@ -30,6 +31,24 @@ jobs:
3031
pip install pandas openpyxl
3132
- name: execute py script
3233
run: python other/scripts/output_file_generator.py ${{github.workspace}}
34+
- name: generate release notes
35+
shell: bash
36+
run: |
37+
START_DATE=$(date -d "$(date +%Y-%m-01) -1 month" +%Y-%m-01)
38+
END_DATE=$(date -d "$(date +%Y-%m-01) -1 day" +%Y-%m-%d)
39+
40+
MONTH_LABEL=$(date -d "$START_DATE" +'%B %Y:')
41+
42+
echo "# Commits in $MONTH_LABEL" > RELEASE_NOTES.md
43+
echo "" >> RELEASE_NOTES.md
44+
45+
git log \
46+
--since="$START_DATE" \
47+
--until="$END_DATE 23:59:59" \
48+
--date=format:'%a %b %e' \
49+
--pretty=format:'- %ad — %s (%an)' \
50+
>> RELEASE_NOTES.md
51+
3352
- name: determine tag name
3453
id: vars
3554
shell: bash
@@ -42,6 +61,7 @@ jobs:
4261
with:
4362
tag_name: ${{ steps.vars.outputs.tag }}
4463
name: ${{ steps.vars.outputs.release_name }}
45-
generate_release_notes: true
64+
generate_release_notes: false
65+
body_path: RELEASE_NOTES.md
4666
files: |
4767
output.xlsx

0 commit comments

Comments
 (0)