2121 EXTENSION_FILE : php_zephir_parser.dll
2222
2323jobs :
24- windows :
24+ windows-builds :
2525 # To prevent build a particular commit use
2626 # git commit -m "......... [win skip] - skip Windows builds only"
2727 # git commit -m "......... [ci skip] - skip all builds"
@@ -190,7 +190,7 @@ jobs:
190190 - name : Upload Zephir Parser
191191 uses : actions/upload-artifact@v2
192192 with :
193- name : zephir-parser-php-${{ matrix.php }}-${{ matrix.build_type }}-win32-${{ matrix.vc_prefix }}${{ matrix.vc_num }}-${{ matrix.arch }}
193+ name : zephir-parser-php-${{ matrix.php }}-${{ matrix.build_type }}-win32-${{ matrix.vc_prefix }}${{ matrix.vc_num }}-${{ matrix.arch }}.zip
194194 path : |
195195 ${{ github.workspace }}\zephir-parser-*.zip
196196
@@ -216,7 +216,7 @@ jobs:
216216 ${{ github.workspace }}\Release*
217217 ${{ github.workspace }}\**\Release*
218218
219- unix :
219+ unix-builds :
220220 # To prevent build a particular commit use
221221 # git commit -m "......... [unix skip] - skip Linux & macOS builds only"
222222 # git commit -m "......... [ci skip] - skip all builds"
@@ -348,6 +348,42 @@ jobs:
348348 - name : Upload Zephir Parser
349349 uses : actions/upload-artifact@v2
350350 with :
351- name : zephir-parser-php-${{ matrix.php }}-${{ matrix.build_type }}-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.arch }}
351+ name : zephir-parser-php-${{ matrix.php }}-${{ matrix.build_type }}-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.arch }}.zip
352352 path : |
353353 ${{ github.workspace }}/modules/*.so
354+
355+ release :
356+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
357+
358+ needs : [windows-builds, unix-builds]
359+ name : Create Release
360+ runs-on : ubuntu-20.04
361+
362+ steps :
363+ - name : Checkout Code
364+ uses : actions/checkout@v2
365+ with :
366+ fetch-depth : 1
367+
368+ - name : Get the release version
369+ id : get-version
370+ run : |
371+ echo ::set-output name=version::${GITHUB_REF#refs/tags/}
372+ echo ::set-output name=release_body::$(.ci/release-notes.sh CHANGELOG.md)
373+
374+ - name : Download Zephir Parser build artifacts
375+ id : download
376+ uses : actions/download-artifact@v2
377+ run : |
378+ ls -lah | grep "\.zip"
379+
380+ - name : Create Release
381+ uses : ncipollo/release-action@v1
382+ with :
383+ token : ${{ secrets.GITHUB_TOKEN }}
384+ name : ${{ steps.get-version.outputs.version }}
385+ tag : ${{ steps.get-version.outputs.version }}
386+ body : ${{ steps.get-version.outputs.release_body }}
387+ allowUpdates : true
388+ artifacts : " ${{steps.download.outputs.download-path}}/zephir-parser*.zip"
389+ artifactContentType : application/octet-stream
0 commit comments