Fix php build (?) #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build PHP | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
build-and-publish: | |
permissions: | |
contents: write | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
- name: Install latest protobuf | |
uses: arduino/setup-protoc@v3 | |
- name: Install dependencies | |
run: | | |
sudo pecl channel-update pecl.php.net | |
sudo pecl install protobuf | |
sudo pecl install grpc | |
- name: Build | |
run: bash build-php.sh | |
- name: Upload PHP artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-php | |
path: build/php | |
- name: Prepare asset for upload | |
run: | | |
tar -czf build/openagents_grpc_proto-PHP.tar.gz -C build/php/ . | |
- name: Upload release asset | |
if: github.event_name == 'release' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: build/openagents_grpc_proto-PHP.tar.gz | |