4040 build-php-cli : false
4141 version : 8.2.0
4242 runs-on : ubuntu-latest
43- env :
44- BINARYEN_VERSION : 111
4543 steps :
4644 - name : Checkout repository
4745 # Only run for the PHP version specified in the git tag.
6563 if : startsWith(github.event.ref, format('refs/tags/php/{0}+', matrix.version))
6664 shell : bash
6765 run : |
68- sudo mv php/build-output/php/php-${{ matrix.version }}/bin/php-cgi{${{ matrix.suffix }},-${{ matrix.version }}${{ matrix.suffix }}.wasm}
66+ sudo mv php/build-output/php/php-${{ matrix.version }}/bin/php-cgi{${{ matrix.suffix }},-${{ matrix.version }}${{ matrix.suffix }}} .wasm
6967 - name : Rename release artifacts
7068 # Only run for the PHP version specified in the git tag.
7169 #
7472 if : ${{ startsWith(github.event.ref, format('refs/tags/php/{0}+', matrix.version)) && matrix.build-php-cli }}
7573 shell : bash
7674 run : |
77- sudo mv php/build-output/php/php-${{ matrix.version }}/bin/php{${{ matrix.suffix }},-${{ matrix.version }}${{ matrix.suffix }}.wasm}
78- - name : Setup binaryen
79- # Only run for the PHP version specified in the git tag.
80- #
81- # This if could be moved to the parent `job` section when it's
82- # supported by GitHub (https://github.com/community/community/discussions/37883)
83- if : startsWith(github.event.ref, format('refs/tags/php/{0}+', matrix.version))
84- shell : bash
85- run : |
86- wget https://github.com/WebAssembly/binaryen/releases/download/version_${{ env.BINARYEN_VERSION }}/binaryen-version_${{ env.BINARYEN_VERSION }}-x86_64-linux.tar.gz
87- tar -xf binaryen-version_${{ env.BINARYEN_VERSION }}-x86_64-linux.tar.gz --strip-components=1 -C /opt
88- rm binaryen-version_${{ env.BINARYEN_VERSION }}-x86_64-linux.tar.gz
89- - name : Optimize php-cgi release artifacts
90- # Only run for the PHP version specified in the git tag.
91- #
92- # This if could be moved to the parent `job` section when it's
93- # supported by GitHub (https://github.com/community/community/discussions/37883)
94- if : startsWith(github.event.ref, format('refs/tags/php/{0}+', matrix.version))
95- shell : bash
96- run : |
97- sudo /opt/bin/wasm-opt -Os -o php/build-output/php/php-${{ matrix.version }}/bin/php-cgi-${{ matrix.version }}${{ matrix.suffix }}.size-optimized.wasm php/build-output/php/php-${{ matrix.version }}/bin/php-cgi-${{ matrix.version }}${{ matrix.suffix }}.wasm
98- sudo /opt/bin/wasm-opt -O -o php/build-output/php/php-${{ matrix.version }}/bin/php-cgi-${{ matrix.version }}${{ matrix.suffix }}.speed-optimized.wasm php/build-output/php/php-${{ matrix.version }}/bin/php-cgi-${{ matrix.version }}${{ matrix.suffix }}.wasm
99- - name : Optimize php release artifacts
100- # Only run for the PHP version specified in the git tag.
101- #
102- # This if could be moved to the parent `job` section when it's
103- # supported by GitHub (https://github.com/community/community/discussions/37883)
104- if : ${{ startsWith(github.event.ref, format('refs/tags/php/{0}+', matrix.version)) && matrix.build-php-cli }}
105- shell : bash
106- run : |
107- sudo /opt/bin/wasm-opt -Os -o php/build-output/php/php-${{ matrix.version }}/bin/php-${{ matrix.version }}${{ matrix.suffix }}.size-optimized.wasm php/build-output/php/php-${{ matrix.version }}/bin/php-${{ matrix.version }}${{ matrix.suffix }}.wasm
108- sudo /opt/bin/wasm-opt -O -o php/build-output/php/php-${{ matrix.version }}/bin/php-${{ matrix.version }}${{ matrix.suffix }}.speed-optimized.wasm php/build-output/php/php-${{ matrix.version }}/bin/php-${{ matrix.version }}${{ matrix.suffix }}.wasm
75+ sudo mv php/build-output/php/php-${{ matrix.version }}/bin/php{${{ matrix.suffix }},-${{ matrix.version }}${{ matrix.suffix }}}.wasm
10976 - name : Create release
11077 # Only run for the PHP version specified in the git tag.
11178 #
11683 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
11784 run : |
11885 gh release create --generate-notes ${{ github.ref_name }} || true
119- - name : Append php-cgi release assets
86+ - name : Append PHP release assets
12087 # Only run for the PHP version specified in the git tag.
12188 #
12289 # This if could be moved to the parent `job` section when it's
@@ -126,22 +93,7 @@ jobs:
12693 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12794 run : |
12895 gh release upload ${{ github.ref_name }} \
129- php/build-output/php/php-${{ matrix.version }}/bin/php-cgi-${{ matrix.version }}${{ matrix.suffix }}.wasm \
130- php/build-output/php/php-${{ matrix.version }}/bin/php-cgi-${{ matrix.version }}${{ matrix.suffix }}.size-optimized.wasm \
131- php/build-output/php/php-${{ matrix.version }}/bin/php-cgi-${{ matrix.version }}${{ matrix.suffix }}.speed-optimized.wasm
132- - name : Append php release assets
133- # Only run for the PHP version specified in the git tag.
134- #
135- # This if could be moved to the parent `job` section when it's
136- # supported by GitHub (https://github.com/community/community/discussions/37883)
137- if : ${{ startsWith(github.event.ref, format('refs/tags/php/{0}+', matrix.version)) && matrix.build-php-cli }}
138- env :
139- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
140- run : |
141- gh release upload ${{ github.ref_name }} \
142- php/build-output/php/php-${{ matrix.version }}/bin/php-${{ matrix.version }}${{ matrix.suffix }}.wasm \
143- php/build-output/php/php-${{ matrix.version }}/bin/php-${{ matrix.version }}${{ matrix.suffix }}.size-optimized.wasm \
144- php/build-output/php/php-${{ matrix.version }}/bin/php-${{ matrix.version }}${{ matrix.suffix }}.speed-optimized.wasm
96+ php/build-output/php/php-${{ matrix.version }}/bin/*.wasm
14597 - name : Generate release assets digests
14698 # Only run for the PHP version specified in the git tag.
14799 #
0 commit comments