16
16
- name : Checkout sources
17
17
uses : actions/checkout@v4
18
18
with :
19
+ # checkout merge request HEAD instead of merge commit
20
+ ref : ${{ github.event.pull_request.head.sha }}
19
21
fetch-depth : 0
20
22
21
23
- name : Get Next Version
@@ -30,24 +32,31 @@ jobs:
30
32
id : short_sha
31
33
run : echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
32
34
35
+ - name : Update CHANGELOG
36
+ id : changelog
37
+ uses : requarks/changelog-action@v1
38
+ with :
39
+ toTag : ${{ steps.semver.outputs.current }}
40
+ fromTag : ${{ github.event.pull_request.head.sha }}
41
+ token : ${{ secrets.GITHUB_TOKEN }}
42
+
33
43
- name : Build artifacts
34
- run : make version=${{ steps.semver.outputs.next }}-${{ steps.short_sha.outputs.short_sha }} artifact
44
+ run : make version=${{ steps.semver.outputs.next }}-pre- ${{ steps.short_sha.outputs.short_sha }} artifact
35
45
36
46
- name : Create Draft Release
37
47
uses : ncipollo/release-action@v1
38
48
if : ${{ !env.ACT }}
39
49
with :
40
50
allowUpdates : true
41
51
artifacts : " rf-liquidsoap*.tar.gz"
42
- commit : master
52
+ body : ${{ steps.changelog.outputs.changes }}
53
+ commit : ${{ github.event.pull_request.head.sha }}
43
54
draft : true
44
- generateReleaseNotes : true
45
55
makeLatest : false
46
- name : ${{ steps.semver.outputs.next }}-pre
47
- omitBodyDuringUpdate : true
56
+ name : ${{ steps.semver.outputs.next }}-pre-${{ github.head_ref }}
48
57
prerelease : true
49
58
removeArtifacts : true
50
59
replacesArtifacts : true
51
- tag : ${{ steps.semver.outputs.next }}-pre
60
+ tag : ${{ steps.semver.outputs.next }}-pre-${{ github.head_ref }}
52
61
token : ${{ secrets.GITHUB_TOKEN }}
53
62
updateOnlyUnreleased : true
0 commit comments