Skip to content

Merge pull request #18 from boxuk/dependabot/npm_and_yarn/wordpress/i… #26

Merge pull request #18 from boxuk/dependabot/npm_and_yarn/wordpress/i…

Merge pull request #18 from boxuk/dependabot/npm_and_yarn/wordpress/i… #26

Workflow file for this run

name: "Packages Split"
on:
push:
branches:
- main
tags:
- "*"
jobs:
packages_split:
runs-on: ubuntu-latest
name: "Publish changes to ${{ matrix.packages.target_repo }}"
strategy:
fail-fast: false
matrix:
packages:
- local_path: "editor-tools"
target_repo: "wp-editor-tools"
- local_path: "iconography"
target_repo: "wp-iconography"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.BOXUK_WP_ROBOT_ACCESS_TOKEN }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Dependencies
run: npm install
- name: Build Packages
run: npm run build
- name: Rename all `.deployignore` files to `.gitignore` in package
working-directory: packages/${{ matrix.packages.local_path }}
run: mv .deployignore .gitignore
- name: Split Monorepo
if: "!startsWith(github.ref, 'refs/tags/')"
uses: "symplify/monorepo-split-github-action@v2.3.0"
env:
GITHUB_TOKEN: ${{ secrets.BOXUK_WP_ROBOT_ACCESS_TOKEN }}
with:
package_directory: "packages/${{ matrix.packages.local_path }}"
repository_organization: "boxuk"
repository_name: "${{ matrix.packages.target_repo }}"
user_name: "boxuk-wp-robot"
user_email: "developers@boxuk.com"
- name: Split Monorepo with Tag
if: "startsWith(github.ref, 'refs/tags/')"
uses: "symplify/monorepo-split-github-action@v2.3.0"
env:
GITHUB_TOKEN: ${{ secrets.BOXUK_WP_ROBOT_ACCESS_TOKEN }}
with:
tag: ${GITHUB_REF#refs/tags/}
package_directory: "packages/${{ matrix.packages.local_path }}"
repository_organization: "boxuk"
repository_name: "${{ matrix.packages.target_repo }}"
user_name: "boxuk-wp-robot"
user_email: "developers@boxuk.com"