-
Notifications
You must be signed in to change notification settings - Fork 27
70 lines (60 loc) · 1.83 KB
/
release.yml
File metadata and controls
70 lines (60 loc) · 1.83 KB
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
63
64
65
66
67
68
69
70
name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
autoconf \
automake \
libtool \
libmariadb-dev \
libmariadb-dev-compat \
zlib1g-dev \
liblzma-dev
- name: Copy configuration headers
run: |
cp src/campaign.example.h src/campaign.h
cp src/mud_options.example.h src/mud_options.h
cp src/vnums.example.h src/vnums.h
- name: Build with autotools
run: |
autoreconf -fvi
./configure
make -j$(nproc)
- name: Generate changelog
id: changelog
run: |
# Get previous tag
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -n "$PREV_TAG" ]; then
echo "## Changes since $PREV_TAG" > RELEASE_NOTES.md
echo "" >> RELEASE_NOTES.md
git log --oneline "$PREV_TAG"..HEAD >> RELEASE_NOTES.md
else
echo "## Initial Release" > RELEASE_NOTES.md
echo "" >> RELEASE_NOTES.md
echo "First tagged release of LuminariMUD." >> RELEASE_NOTES.md
fi
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body_path: RELEASE_NOTES.md
draft: false
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}