Skip to content

Commit f06805a

Browse files
committed
ci(prerelease): rename prerelease package
1 parent 9c2ba7a commit f06805a

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/release-pre.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
- name: Checkout sources
1717
uses: actions/checkout@v4
1818
with:
19+
# checkout merge request HEAD instead of merge commit
20+
ref: ${{ github.event.pull_request.head.sha }}
1921
fetch-depth: 0
2022

2123
- name: Get Next Version
@@ -30,24 +32,31 @@ jobs:
3032
id: short_sha
3133
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
3234

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+
3343
- 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
3545

3646
- name: Create Draft Release
3747
uses: ncipollo/release-action@v1
3848
if: ${{ !env.ACT }}
3949
with:
4050
allowUpdates: true
4151
artifacts: "rf-liquidsoap*.tar.gz"
42-
commit: master
52+
body: ${{ steps.changelog.outputs.changes }}
53+
commit: ${{ github.event.pull_request.head.sha }}
4354
draft: true
44-
generateReleaseNotes: true
4555
makeLatest: false
46-
name: ${{ steps.semver.outputs.next }}-pre
47-
omitBodyDuringUpdate: true
56+
name: ${{ steps.semver.outputs.next }}-pre-${{ github.head_ref }}
4857
prerelease: true
4958
removeArtifacts: true
5059
replacesArtifacts: true
51-
tag: ${{ steps.semver.outputs.next }}-pre
60+
tag: ${{ steps.semver.outputs.next }}-pre-${{ github.head_ref }}
5261
token: ${{ secrets.GITHUB_TOKEN }}
5362
updateOnlyUnreleased: true

0 commit comments

Comments
 (0)