Skip to content

Update CHANGELOG.md #431

Update CHANGELOG.md

Update CHANGELOG.md #431

Workflow file for this run

name: Split Monorepo
on:
push:
branches:
- main
- '*.x'
- '*.*.x'
tags:
- 'v*.*.*'
jobs:
provide_packages_json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# required for matrix of packages set
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
- uses: "ramsey/composer-install@v3"
# get package json list
-
id: output_data
run: echo "matrix=$(vendor/bin/monorepo-builder packages-json)" >> $GITHUB_OUTPUT
# this step is needed, so the output gets to the next defined job
outputs:
matrix: ${{ steps.output_data.outputs.matrix }}
split_monorepo:
needs: provide_packages_json
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{fromJson(needs.provide_packages_json.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
# no tag
-
if: "!startsWith(github.ref, 'refs/tags/')"
# Uses an action in the root directory
name: Monorepo Split of ${{ matrix.package }}
uses: symplify/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
package_directory: 'src/mantle/${{ matrix.package }}'
repository_organization: 'mantle-framework'
repository_name: '${{ matrix.package }}'
repository_host: github.com
user_name: "mantle-ci"
user_email: "[email protected]"
branch: ${{ github.ref_name }}
# with tag
-
if: "startsWith(github.ref, 'refs/tags/')"
name: "Extract branch name"
id: extract-branch-name
run: echo "branch=$(git branch -a --contains ${{ github.sha }} | grep -v 'HEAD' | sed -n 2p | awk '{ printf $1 }' | sed 's/remotes\/origin\///g')" >> $GITHUB_OUTPUT
-
if: "startsWith(github.ref, 'refs/tags/')"
# Uses an action in the root directory
name: Monorepo Tagged Split of ${{ matrix.package }}
uses: symplify/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
tag: ${GITHUB_REF#refs/tags/}
package_directory: 'src/mantle/${{ matrix.package }}'
repository_organization: 'mantle-framework'
repository_name: '${{ matrix.package }}'
repository_host: "github.com"
user_name: "mantle-ci"
user_email: "[email protected]"
branch: ${{ steps.extract-branch-name.outputs.branch }}