-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (54 loc) · 1.71 KB
/
release-pre.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
name: Pre-release
on:
pull_request:
jobs:
prerelease:
name: Pre-release
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
# checkout merge request HEAD instead of merge commit
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Get Next Version
id: semver
uses: ietf-tools/semver-action@v1
if: ${{ !env.ACT }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: master
- name: Short SHA
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
fromTag: ${{ steps.semver.outputs.current }}
toTag: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build artifacts
run: make version=${{ steps.semver.outputs.next }}-pre-${{ steps.short_sha.outputs.short_sha }} artifact
- name: Create Draft Release
uses: ncipollo/release-action@v1
if: ${{ !env.ACT }}
with:
allowUpdates: true
artifacts: "rf-liquidsoap*.tar.gz"
body: ${{ steps.changelog.outputs.changes }}
commit: ${{ github.event.pull_request.head.sha }}
draft: true
makeLatest: false
name: ${{ steps.semver.outputs.next }}-pre-${{ github.head_ref }}
prerelease: true
removeArtifacts: true
replacesArtifacts: true
tag: ${{ steps.semver.outputs.next }}-pre-${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
updateOnlyUnreleased: true