Skip to content

Merge pull request #12 from mynaparrot/release-please--branches--main #44

Merge pull request #12 from mynaparrot/release-please--branches--main

Merge pull request #12 from mynaparrot/release-please--branches--main #44

Workflow file for this run

name: Generate usable library and upload as release asset
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-library:
runs-on: ubuntu-latest
steps:
- name: Release please
uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: php
- name: Checkout code
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
- name: Setup PHP
if: ${{ steps.release.outputs.release_created }}
uses: shivammathur/setup-php@v2
with:
php-version: "8.x"
- name: Build project
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p build
rsync -ar src composer.json LICENSE README.md build/
cd build
composer install --no-dev --optimize-autoloader --no-scripts --ignore-platform-reqs
zip -X -r plugNmeet-sdk-php-release.zip *
gh release upload ${{ steps.release.outputs.tag_name }} plugNmeet-sdk-php-release.zip