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
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
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