Skip to content

Commit

Permalink
chore: Add GH action to release php8 for wasmedge
Browse files Browse the repository at this point in the history
  • Loading branch information
assambar committed Apr 7, 2023
1 parent a82ac3b commit 72fdc35
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release-php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
flavor: ""
build-php-cli: false
version: 8.2.0
- name: wasmedge-php-
suffix: "-wasmedge"
flavor: ""
build-php-cli: false
version: 8.2.0
- name: php-
suffix: ""
flavor: -slim
Expand Down Expand Up @@ -58,7 +63,7 @@ jobs:
if: startsWith(github.event.ref, format('refs/tags/php/{0}+', matrix.version))
shell: bash
run: |
sudo mv build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}/bin/php-cgi{${{ matrix.suffix }},-${{ matrix.version }}${{ matrix.suffix }}${{ matrix.flavor }}}.wasm
sudo mv build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}${{ matrix.suffix }}/bin/php-cgi{${{ matrix.suffix }},-${{ matrix.version }}${{ matrix.suffix }}${{ matrix.flavor }}}.wasm
- name: Rename release artifacts
# Only run for the PHP version specified in the git tag.
#
Expand All @@ -67,7 +72,7 @@ jobs:
if: ${{ startsWith(github.event.ref, format('refs/tags/php/{0}+', matrix.version)) && matrix.build-php-cli }}
shell: bash
run: |
sudo mv build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}/bin/php{${{ matrix.suffix }},-${{ matrix.version }}${{ matrix.suffix }}${{ matrix.flavor }}}.wasm
sudo mv build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}${{ matrix.suffix }}/bin/php{${{ matrix.suffix }},-${{ matrix.version }}${{ matrix.suffix }}${{ matrix.flavor }}}.wasm
- name: Create release
# Only run for the PHP version specified in the git tag.
#
Expand All @@ -88,7 +93,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} \
build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}/bin/*.wasm
build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}${{ matrix.suffix }}/bin/*.wasm
- name: Generate release assets digests
# Only run for the PHP version specified in the git tag.
#
Expand All @@ -98,7 +103,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for asset in build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}/bin/*.wasm; do
for asset in build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}${{ matrix.suffix }}/bin/*.wasm; do
sha256sum "$asset" | sudo tee "$asset.sha256sum" > /dev/null
done
- name: Append release assets digests
Expand All @@ -111,4 +116,4 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} \
build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}/bin/*.sha256sum
build-output/php/php-${{ matrix.version }}${{ matrix.flavor }}${{ matrix.suffix }}/bin/*.sha256sum

0 comments on commit 72fdc35

Please sign in to comment.