Skip to content

Commit fd14a53

Browse files
committed
experimental tweak to github action
1 parent e284165 commit fd14a53

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,24 @@ jobs:
4545
mkdir -p dist
4646
cp -R KoLmafia/* dist/
4747
cp -R build/* dist/
48+
- name: Create Changelog
49+
id: changelog
50+
uses: actions/github-script@v6.3.1
51+
env:
52+
COMMITS: ${{ toJSON(github.event.commits) }}
53+
with:
54+
result-encoding: string
55+
script: |
56+
const commits = JSON.parse(process.env.COMMITS);
57+
var lines = "## What’s Changed\n\n";
58+
for (const commit of commits) {
59+
lines += "- " + commit.message + " (" + commit.id + ") @" + commit.author.username + "\n"
60+
}
61+
return lines
4862
- uses: s0/git-publish-subdir-action@develop
4963
env:
5064
REPO: self
5165
BRANCH: release
5266
FOLDER: dist
5367
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
MESSAGE: 'Release for commit ${{ github.sha }}: ${{ github.event.commits[0].message }}'
68+
MESSAGE: '${{ steps.changelog.outputs.result }}'

0 commit comments

Comments
 (0)