@@ -29,27 +29,11 @@ jobs:
2929 echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token;
3030 gh release view $(basename ${{ github.event.inputs.releaseNoteUrl }}) > temp_change.md
3131 - name : Tweak changelogs
32- run : >
33- sed -i '1,10d' temp_change.md;
34- sed -i '1h;1d;$!H;$!d;G' temp_change.md;
35- sed -i -re 's/\*\*Full Changelog\*\*: (.*)/\[Full Changelog\]\(\1\)\n/' temp_change.md;
36- sed -i '/## New Contributors/,$d' temp_change.md;
37- sed -i -re 's/^\*(.*)\sby\s@(.*)\sin\s(.*\/pull\/)(.*)\r?/-\1 [\\#\4](\3\4) ([\2](https:\/\/github.com\/\2))/' temp_change.md;
38- sed -i 's/\[Quotae/\[Quote_a/' temp_change.md;
39- sed -i 's/\[learn2draw/\[Lexy/' temp_change.md;
40- sed -i 's/\[Voronoff/\[Tom Clancy Is Dead/' temp_change.md;
41- sed -i 's/\[PJacek/\[TPlant/' temp_change.md;
42- sed -i 's/\[justjuangui/\[trompetin17/' temp_change.md;
43- sed -i 's/\r//g' temp_change.md;
44- cp temp_change.md changelog_temp.txt;
45- cat CHANGELOG.md | tr \\r \\n | sed '1d' >> temp_change.md;
46- printf "# Changelog\n\n## [v${{ github.event.inputs.releaseVersion }}](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v${{ github.event.inputs.releaseVersion }}) ($(date +'%Y/%m/%d'))\n\n" | cat - temp_change.md > CHANGELOG.md;
47-
48- sed -i -re 's/^- (.*) \[.*\) \(\[(.*)\]\(.*/* \1 (\2)/' changelog_temp.txt;
49- echo "VERSION[${{ github.event.inputs.releaseVersion }}][`date +'%Y/%m/%d'`]" | cat - changelog_temp.txt | tr -d \\r | sed '2,3d' | sed -re 's/^### (.*)/\n--- \1 ---/' | sed -e '/^##.*/,+1 d' | cat - changelog.txt > changelog_new.txt;
50- rm temp_change.md;
51- rm changelog_temp.txt;
52- mv changelog_new.txt changelog.txt
32+ run : |
33+ # Remove carriage returns to be able to run the script
34+ sed -i 's/\r$//' .github/tweak_changelogs.sh
35+ chmod +x .github/tweak_changelogs.sh
36+ .github/tweak_changelogs.sh "v${{ github.event.inputs.releaseVersion }}"
5337 - name : Create Pull Request
5438 uses : peter-evans/create-pull-request@v5
5539 with :
0 commit comments