feat(console): allow calling console commands via fqcn (#824) #18
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: 'Sub-split Packages' | |
on: | |
push: | |
branches: [ main ] | |
tags: [ '*' ] | |
workflow_dispatch: | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
jobs: | |
get_packages: | |
name: Get Packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.4 | |
coverage: none | |
- uses: actions/checkout@v4 | |
- name: Get Packages | |
id: get_json | |
run: echo "::set-output name=json::$(bin/get-packages)" | |
- name: Output Packages | |
run: echo "${{ steps.get_json.outputs.json }}" | |
outputs: | |
matrix: ${{ steps.get_json.outputs.json }} | |
packages_split: | |
name: Split Package ${{ matrix.package.name }} | |
needs: get_packages | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
package: ${{ fromJson(needs.get_packages.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
# no tag | |
- | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
uses: "symplify/[email protected]" | |
with: | |
# β split "src/Tempest/Console" directory | |
package_directory: '${{ matrix.package.directory }}' | |
# β into https://github.com/tempestphp/tempest-console repository | |
repository_organization: '${{ matrix.package.organization }}' | |
repository_name: '${{ matrix.package.repository }}' | |
# β the user signed under the split commit | |
user_name: "aidan-casey" | |
user_email: "[email protected]" | |
# with tag | |
- | |
if: "startsWith(github.ref, 'refs/tags/')" | |
uses: "symplify/[email protected]" | |
with: | |
tag: ${GITHUB_REF#refs/tags/} | |
# β split "src/Tempest/Console" directory | |
package_directory: '${{ matrix.package.directory }}' | |
# β into https://github.com/tempestphp/tempest-console repository | |
repository_organization: '${{ matrix.package.organization }}' | |
repository_name: '${{ matrix.package.repository }}' | |
# β the user signed under the split commit | |
user_name: "aidan-casey" | |
user_email: "[email protected]" |