Skip to content

Unity Docs Ref Updated #8

Unity Docs Ref Updated

Unity Docs Ref Updated #8

name: Duplicate Package Sample Workflow
on:
push:
branches: [main]
jobs:
duplicate:
name: Duplicate Project Samples
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Run duplicate script file
run: |
export SOURCE_DIRECTORY="${GITHUB_WORKSPACE}/src/SampleProject/Assets/Samples/CereBro.Unity/1.0.5/CereBro.Unity Sample/"
export DESTINATION_DIRECTORY="${GITHUB_WORKSPACE}/Packages/com.cerebro.unity/Samples~/CereBro.Unity Sample/"
rm -r "$DESTINATION_DIRECTORY"
cp -r "$SOURCE_DIRECTORY" "$DESTINATION_DIRECTORY"
- name: Commit and Push
run: |
git config user.email $git_email
git config user.name "${{ github.actor }}"
git add "./Packages/com.cerebro.unity/Samples~/CereBro.Unity Sample/" -f
git diff-index --cached --quiet HEAD || git commit -m "Auto-duplicate Package Samples"
git push
env:
git_email: "${{ github.actor }}@users.noreply.github.com"