@@ -124,10 +124,76 @@ jobs:
124
124
path : |
125
125
${{ github.workspace }}/zephir-parser-*.zip
126
126
127
+ pecl :
128
+ name : Build PECL package
129
+ runs-on : ubuntu-20.04
130
+
131
+ steps :
132
+ - uses : actions/checkout@v2
133
+
134
+ - name : Install PHP
135
+ uses : shivammathur/setup-php@v2
136
+ with :
137
+ php-version : ' 8.0'
138
+ tools : pecl
139
+
140
+ - name : Install System Dependencies
141
+ run : |
142
+ sudo apt-get update --quiet --yes 1>/dev/null
143
+ sudo apt-get install --no-install-recommends -q -y re2c
144
+
145
+ - name : Build Zephir Parser
146
+ run : |
147
+ echo "::group::Run phpize"
148
+ phpize
149
+ echo "::endgroup::"
150
+
151
+ echo "::group::Run configure"
152
+ ./configure \
153
+ --enable-zephir-parser \
154
+ --enable-zephir-parser-debug
155
+ echo "::endgroup::"
156
+
157
+ echo "::group::Compile"
158
+ make -j$(getconf _NPROCESSORS_ONLN)
159
+ echo "::endgroup::"
160
+
161
+ - name : Prepare PECL package config
162
+ shell : pwsh
163
+ run : |
164
+ echo "-- Replacing Release data"
165
+ $Config = [xml](Get-Content ./package.xml)
166
+ $Config.package.date = $(Get-Date -Format "yyyy-MM-dd")
167
+ $Config.package.time = $(Get-Date -Format "HH:mm:ss")
168
+ $Config.package.version.Item(1).release = $(Get-Content ./VERSION)
169
+ $Config.package.version.Item(1).api = $Config.package.version.release
170
+
171
+ echo "-- Parsing CHANGELOG"
172
+ ./.ci/release-notes.sh ./CHANGELOG.md > ./release-notes.md
173
+ $Config.package.notes = $(Get-Content ./release-notes.md -Encoding UTF8 -Raw)
174
+ $Config.Save('./package.xml')
175
+
176
+ - name : Create PECL package
177
+ run : |
178
+ pecl package
179
+ zephir_parser_package="`ls | grep zephir_parser-*tgz`"
180
+ mv $zephir_parser_package zephir_parser-pecl.tgz
181
+
182
+ - name : Validate PECL Package
183
+ run : |
184
+ pecl package-validate zephir_parser-pecl.tgz
185
+ pecl info zephir_parser-pecl.tgz
186
+
187
+ - name : Upload Artifact
188
+ uses : actions/upload-artifact@v2
189
+ with :
190
+ name : ' zephir_parser-pecl'
191
+ path : zephir_parser-pecl.tgz
192
+
127
193
release :
128
194
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
129
195
130
- needs : [ builds ]
196
+ needs : [ builds, pecl ]
131
197
name : Create Release
132
198
runs-on : ubuntu-20.04
133
199
0 commit comments