Skip to content

Commit 748b44a

Browse files
committed
add realease notes
1 parent c984766 commit 748b44a

File tree

2 files changed

+123
-12
lines changed

2 files changed

+123
-12
lines changed

.github/release_template.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
## 🚀 FastCSV Extension vX.Y.Z
2+
3+
A high-performance CSV parsing extension for PHP.
4+
5+
### 📦 Available Builds
6+
7+
#### Linux:
8+
- PHP 8.2: `fastcsv-linux-php8.2.so`
9+
- PHP 8.3: `fastcsv-linux-php8.3.so`
10+
- PHP 8.4: `fastcsv-linux-php8.4.so`
11+
12+
#### macOS:
13+
- PHP 8.2: `fastcsv-macos-php8.2.so`
14+
- PHP 8.3: `fastcsv-macos-php8.3.so`
15+
- PHP 8.4: `fastcsv-macos-php8.4.so`
16+
17+
### 🔧 Installation
18+
19+
1. **Download** the appropriate file for your platform and PHP version
20+
2. **Rename** the downloaded file to `fastcsv.so`
21+
3. **Copy** to your PHP extensions directory:
22+
```bash
23+
# Find your PHP extension directory
24+
php -i | grep extension_dir
25+
26+
# Copy and rename (example for Linux PHP 8.2)
27+
cp fastcsv-linux-php8.2.so /path/to/extension_dir/fastcsv.so
28+
```
29+
4. **Configure** your php.ini:
30+
```ini
31+
extension=fastcsv.so
32+
```
33+
5. **Restart** your PHP service/server
34+
35+
### ✅ Verify Installation
36+
```bash
37+
# Check if the extension is loaded
38+
php -m | grep fastcsv
39+
40+
# Test basic functionality
41+
php -r "var_dump(extension_loaded('fastcsv'));"
42+
```
43+
44+
### 📝 Changes in this Release
45+
46+
<!-- Add your changelog here -->
47+
48+
### 🐛 Issues & Support
49+
50+
If you encounter any issues, please [open an issue](https://github.com/your-repo/issues) on GitHub.
51+
52+
### 🔗 Quick Start
53+
54+
```php
55+
<?php
56+
// Basic usage example
57+
$reader = new FastCSVReader('data.csv');
58+
while ($row = $reader->read()) {
59+
print_r($row);
60+
}
61+
$reader->close();
62+
?>
63+
```

.github/workflows/release.yml

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4
2121
with:
2222
submodules: true
23+
fetch-depth: 0
2324

2425
- name: Setup PHP
2526
uses: shivammathur/setup-php@v2
@@ -59,6 +60,7 @@ jobs:
5960
- uses: actions/checkout@v4
6061
with:
6162
submodules: true
63+
fetch-depth: 0
6264

6365
- name: Setup PHP
6466
uses: shivammathur/setup-php@v2
@@ -93,6 +95,38 @@ jobs:
9395
needs: [build-linux, build-macos]
9496
runs-on: ubuntu-latest
9597
steps:
98+
- uses: actions/checkout@v4
99+
with:
100+
submodules: true
101+
fetch-depth: 0
102+
103+
- name: Generate changelog
104+
id: changelog
105+
run: |
106+
echo "Generating changelog for tag ${{ github.ref_name }}"
107+
108+
# Get the previous tag
109+
PREVIOUS_TAG=$(git describe --tags --abbrev=0 ${{ github.ref_name }}^ 2>/dev/null || echo "")
110+
111+
if [ -z "$PREVIOUS_TAG" ]; then
112+
echo "No previous tag found, getting all commits"
113+
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges)
114+
else
115+
echo "Getting commits since $PREVIOUS_TAG"
116+
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges $PREVIOUS_TAG..${{ github.ref_name }})
117+
fi
118+
119+
# Escape newlines for GitHub Actions
120+
CHANGELOG="${CHANGELOG//'%'/'%25'}"
121+
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
122+
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
123+
124+
echo "changelog<<EOF" >> $GITHUB_OUTPUT
125+
echo "$CHANGELOG" >> $GITHUB_OUTPUT
126+
echo "EOF" >> $GITHUB_OUTPUT
127+
128+
echo "Changelog generated with $(echo "$CHANGELOG" | wc -l) entries"
129+
96130
- name: Create release directories
97131
run: |
98132
mkdir -p dist/releases/${{ github.ref_name }}/{linux,macos,final}
@@ -151,11 +185,13 @@ jobs:
151185
files: |
152186
dist/releases/${{ github.ref_name }}/final/fastcsv-linux-php*.so
153187
dist/releases/${{ github.ref_name }}/final/fastcsv-macos-php*.so
154-
name: Release ${{ github.ref_name }}
188+
name: FastCSV ${{ github.ref_name }}
155189
body: |
156-
## FastCSV Extension ${{ github.ref_name }}
190+
## 🚀 FastCSV Extension ${{ github.ref_name }}
191+
192+
A high-performance CSV parsing extension for PHP.
157193
158-
### Available Builds:
194+
### 📦 Available Builds
159195
160196
#### Linux:
161197
- PHP 8.2: `fastcsv-linux-php8.2.so`
@@ -167,29 +203,41 @@ jobs:
167203
- PHP 8.3: `fastcsv-macos-php8.3.so`
168204
- PHP 8.4: `fastcsv-macos-php8.4.so`
169205
170-
### Installation
171-
1. Download the appropriate file for your platform and PHP version
172-
2. Rename the downloaded file to `fastcsv.so`
173-
3. Copy the renamed file to your PHP extensions directory:
206+
### 🔧 Installation
207+
208+
1. **Download** the appropriate file for your platform and PHP version
209+
2. **Rename** the downloaded file to `fastcsv.so`
210+
3. **Copy** to your PHP extensions directory:
174211
```bash
175212
# Find your PHP extension directory
176213
php -i | grep extension_dir
177214
178-
# Copy and rename in one command (example for Linux PHP 8.2)
215+
# Copy and rename (example for Linux PHP 8.2)
179216
cp fastcsv-linux-php8.2.so /path/to/extension_dir/fastcsv.so
180217
```
181-
4. Add to your php.ini:
218+
4. **Configure** your php.ini:
182219
```ini
183220
extension=fastcsv.so
184221
```
185-
5. Restart your PHP service/server
222+
5. **Restart** your PHP service/server
186223
187-
### Verify Installation
224+
### Verify Installation
188225
```bash
189226
# Check if the extension is loaded
190227
php -m | grep fastcsv
228+
229+
# Test basic functionality
230+
php -r "var_dump(extension_loaded('fastcsv'));"
191231
```
232+
233+
### 📝 Changes in this Release
234+
235+
${{ steps.changelog.outputs.changelog }}
236+
237+
### 🐛 Issues & Support
238+
239+
If you encounter any issues, please [open an issue](https://github.com/${{ github.repository }}/issues) on GitHub.
192240
draft: false
193241
prerelease: false
194-
generate_release_notes: true
242+
generate_release_notes: false
195243
fail_on_unmatched_files: false

0 commit comments

Comments
 (0)