Skip to content

chore(deps): bump typescript from 6.0.3 to 7.0.2 (#101) #96

chore(deps): bump typescript from 6.0.3 to 7.0.2 (#101)

chore(deps): bump typescript from 6.0.3 to 7.0.2 (#101) #96

name: Split Packages
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: split-packages
cancel-in-progress: false
permissions:
contents: read
jobs:
split-php:
name: Split PHP Package
runs-on: ubuntu-latest
steps:
- name: Checkout mono-repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Validate SPLIT_TOKEN
env:
SPLIT_TOKEN: ${{ secrets.SPLIT_TOKEN }}
run: |
if [[ -z "${SPLIT_TOKEN}" ]]; then
echo "::error::SPLIT_TOKEN secret is not set or empty"
exit 1
fi
- name: Split and push packages/php
env:
SPLIT_TOKEN: ${{ secrets.SPLIT_TOKEN }}
TARGET_REPO: ${{ github.repository_owner }}/${{ vars.PHP_REPO_NAME || 'safeaccess-inline-php' }}
run: |
echo "Target: ${TARGET_REPO}"
SHA=$(git subtree split --prefix=packages/php)
echo "Split SHA: ${SHA}"
git remote add split-php "https://x-access-token:${SPLIT_TOKEN}@github.com/${TARGET_REPO}.git" 2>/dev/null || true
git push split-php "${SHA}:refs/heads/main" --force 2>&1 || {
echo "::error::Push to ${TARGET_REPO} failed. Check that SPLIT_TOKEN has Contents read+write permission on the target repository."
exit 1
}
split-js:
name: Split JS Package
runs-on: ubuntu-latest
steps:
- name: Checkout mono-repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Validate SPLIT_TOKEN
env:
SPLIT_TOKEN: ${{ secrets.SPLIT_TOKEN }}
run: |
if [[ -z "${SPLIT_TOKEN}" ]]; then
echo "::error::SPLIT_TOKEN secret is not set or empty"
exit 1
fi
- name: Split and push packages/js
env:
SPLIT_TOKEN: ${{ secrets.SPLIT_TOKEN }}
TARGET_REPO: ${{ github.repository_owner }}/${{ vars.JS_REPO_NAME || 'safeaccess-inline-js' }}
run: |
echo "Target: ${TARGET_REPO}"
SHA=$(git subtree split --prefix=packages/js)
echo "Split SHA: ${SHA}"
git remote add split-js "https://x-access-token:${SPLIT_TOKEN}@github.com/${TARGET_REPO}.git" 2>/dev/null || true
git push split-js "${SHA}:refs/heads/main" --force 2>&1 || {
echo "::error::Push to ${TARGET_REPO} failed. Check that SPLIT_TOKEN has Contents read+write permission on the target repository."
exit 1
}