prepare release #375
Workflow file for this run
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
# --------------------------------------------------------------------------------------------------------- # | |
# Split Packages Workflow | |
# | |
# Inspiration from: https://blog.logrocket.com/hosting-all-your-php-packages-together-in-a-monorepo/ | |
# Based on: https://github.com/symplify/monorepo-split-github-action | |
# --------------------------------------------------------------------------------------------------------- # | |
name: 'Split Packages' | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- '*' | |
# Avoid running on pull requests | |
pull_request: null | |
env: | |
# 1. for GitHub split | |
GITHUB_TOKEN: ${{ secrets.SPLIT_ACCESS_TOKEN }} | |
# 2. for Gitlab split | |
# GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
# Repository organisation | |
ORGANISATION: "aedart" | |
# Author and Email for signing split | |
USER_NAME: "aedart" | |
USER_EMAIL: "[email protected]" | |
jobs: | |
# ------------------------------------------------------------------------------------------------------- # | |
# Split mono repository into several packages... | |
# ------------------------------------------------------------------------------------------------------- # | |
split_monorepo: | |
if: github.repository == 'aedart/athenaeum' | |
name: "Split mono-repository" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Define the local directory and remote repository for each package! | |
# - local = Directory name inside packages | |
# - remote = Repository name | |
# | |
# NOTE: When creating new packages, make sure to manually create the first | |
# commit ~ initialise the remote repo, or split will fail. | |
# | |
package: | |
- local: 'Acl' | |
remote: 'athenaeum-acl' | |
- local: 'Antivirus' | |
remote: 'athenaeum-antivirus' | |
- local: 'Audit' | |
remote: 'athenaeum-audit' | |
- local: 'Auth' | |
remote: 'athenaeum-auth' | |
- local: 'Circuits' | |
remote: 'athenaeum-circuits' | |
- local: 'Collections' | |
remote: 'athenaeum-collections' | |
- local: 'Config' | |
remote: 'athenaeum-config' | |
- local: 'Console' | |
remote: 'athenaeum-console' | |
- local: 'Container' | |
remote: 'athenaeum-container' | |
- local: 'Contracts' | |
remote: 'athenaeum-contracts' | |
- local: 'Core' | |
remote: 'athenaeum-core' | |
- local: 'Database' | |
remote: 'athenaeum-database' | |
- local: 'Dto' | |
remote: 'athenaeum-dto' | |
- local: 'ETags' | |
remote: 'athenaeum-etags' | |
- local: 'Events' | |
remote: 'athenaeum-events' | |
- local: 'Filters' | |
remote: 'athenaeum-filters' | |
- local: 'Flysystem/Db' | |
remote: 'athenaeum-flysystem-db' | |
- local: 'Http/Api' | |
remote: 'athenaeum-http-api' | |
- local: 'Http/Clients' | |
remote: 'athenaeum-http-clients' | |
- local: 'Http/Cookies' | |
remote: 'athenaeum-http-cookies' | |
- local: 'Http/Messages' | |
remote: 'athenaeum-http-messages' | |
- local: 'Maintenance/Modes' | |
remote: 'athenaeum-maintenance-modes' | |
- local: 'MimeTypes' | |
remote: 'athenaeum-mime-types' | |
- local: 'Pagination' | |
remote: 'athenaeum-pagination' | |
- local: 'Properties' | |
remote: 'athenaeum-properties' | |
- local: 'Redmine' | |
remote: 'athenaeum-redmine' | |
- local: 'Service' | |
remote: 'athenaeum-service' | |
- local: 'Streams' | |
remote: 'athenaeum-streams' | |
- local: 'Support' | |
remote: 'athenaeum-support' | |
- local: 'Testing' | |
remote: 'athenaeum-testing' | |
- local: 'Translation' | |
remote: 'athenaeum-translation' | |
- local: 'Utils' | |
remote: 'athenaeum-utils' | |
- local: 'Validation' | |
remote: 'athenaeum-validation' | |
steps: | |
- uses: actions/checkout@v3 | |
# When no tag available | |
- name: "Split of ${{ matrix.package.local }} to remote ${{ matrix.package.remote }} - NO TAG" | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
uses: "symplify/[email protected]" | |
with: | |
# ↓ split "packages/xyz" directory | |
package_directory: 'packages/${{ matrix.package.local }}' | |
# ↓ into https://github.com/aedart/xyz repository | |
repository_organization: "${ORGANISATION}" | |
repository_name: '${{ matrix.package.remote }}' | |
# ↓ the user signed under the split commit | |
user_name: "${USER_NAME}" | |
user_email: "${USER_EMAIL}" | |
# When tag available | |
- name: "Split of ${{ matrix.package.local }} to remote ${{ matrix.package.remote }} - WITH TAG" | |
if: "startsWith(github.ref, 'refs/tags/')" | |
uses: "symplify/[email protected]" | |
with: | |
# Set tag | |
tag: ${GITHUB_REF#refs/tags/} | |
# ↓ split "packages/xyz" directory | |
package_directory: 'packages/${{ matrix.package.local }}' | |
# ↓ into https://github.com/aedart/xyz repository | |
repository_organization: "${ORGANISATION}" | |
repository_name: '${{ matrix.package.remote }}' | |
# ↓ the user signed under the split commit | |
user_name: "${USER_NAME}" | |
user_email: "${USER_EMAIL}" |