-
Notifications
You must be signed in to change notification settings - Fork 3
139 lines (109 loc) · 4 KB
/
Copy pathrelease.yml
File metadata and controls
139 lines (109 loc) · 4 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
jobs:
# First, trigger builds for all platforms
build:
uses: ./.github/workflows/ci.yml
create-release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify tag format
run: |
if [[ ! "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Tag must be in format v*.*.* (e.g., v1.0.0)"
exit 1
fi
- name: Extract version info
id: version
run: |
VERSION="${{ github.ref_name }}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create artifact archives
run: |
cd artifacts
for dir in */; do
dirname="${dir%/}"
tar -czf "${dirname}.tar.gz" -C "$dirname" .
zip -r "${dirname}.zip" "$dirname"
done
cd ..
- name: Generate release notes
id: notes
run: |
# Get the previous tag
PREV_TAG=$(git describe --tags --abbrev=0 ${{ github.ref_name }}^ 2>/dev/null || echo "")
if [ -z "$PREV_TAG" ]; then
echo "This is the first release"
CHANGELOG=$(git log --pretty=format:"- %s (%h)" ${{ github.ref_name }})
else
echo "Changes since $PREV_TAG"
CHANGELOG=$(git log --pretty=format:"- %s (%h)" ${PREV_TAG}..${{ github.ref_name }})
fi
# Save to file to handle multiline
cat > release_notes.md << 'EOF'
## 📦 Release ${{ steps.version.outputs.version }}
### Changes in this release
$CHANGELOG
### 📦 Pre-built Binaries
Download the appropriate archive for your platform:
- **Linux GCC 14**: `EntropyCore-Linux-gcc-14.tar.gz` / `.zip`
- **macOS Universal**: `EntropyCore-macOS-universal.tar.gz` / `.zip` (Intel + Apple Silicon)
- **Windows x64**: `EntropyCore-Windows-x64.tar.gz` / `.zip`
Each archive contains:
- **lib/**: Static library (`libEntropyCore.a` or `EntropyCore.lib`)
- **include/**: All C++ and C headers
- **lib/cmake/EntropyCore/**: CMake config files
Extract and use in your project:
```cmake
find_package(EntropyCore REQUIRED PATHS /path/to/extracted/lib/cmake/EntropyCore)
target_link_libraries(YourTarget PRIVATE EntropyCore::Core)
```
### 🔧 Building from Source
```bash
# Clone the repository
git clone https://github.com/${{ github.repository }}.git
cd EntropyCore
git checkout ${{ github.ref_name }}
# Basic build (minimal dependencies)
cmake -B build -S .
cmake --build build
# With Tracy profiler
cmake -B build -S . -DENTROPY_WITH_TRACY=ON -DVCPKG_MANIFEST_FEATURES=tracy
# With tests
cmake -B build -S . -DENTROPY_BUILD_TESTS=ON -DVCPKG_MANIFEST_FEATURES=tests
```
### 📚 Documentation
See [README.md](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/README.md) for complete documentation.
### 🐛 Reporting Issues
Found a bug? [Open an issue](https://github.com/${{ github.repository }}/issues/new)
EOF
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: "Release ${{ steps.version.outputs.version }}"
body_path: release_notes.md
files: |
artifacts/*.tar.gz
artifacts/*.zip
draft: false
prerelease: false
make_latest: true
generate_release_notes: true
- name: Announce release
run: |
echo "✅ Release ${{ steps.version.outputs.version }} created successfully!"
echo "🔗 View at: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}"