UPM #14
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
name: UPM | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch' | |
required: true | |
default: 'upm' | |
jobs: | |
deploy-upm: | |
name: Deploy to UPM branch | |
runs-on: ubuntu-latest | |
env: | |
PKG_ROOT: Packages/com.chark.scriptable-scenes | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Move 'Assets/Samples' directory to 'Samples~' | |
run: | | |
ls -la | |
mv 'Assets/Samples' 'Samples~' | |
- name: Checkout '${{ env.PKG_ROOT }}' directory on '${{ github.event.inputs.branch }}' branch | |
run: | | |
ls -la | |
git branch -d '${{ github.event.inputs.branch }}' &> /dev/null || echo '${{ github.event.inputs.branch }} branch not found' | |
git subtree split -P '${{ env.PKG_ROOT }}' -b '${{ github.event.inputs.branch }}' | |
git checkout '${{ github.event.inputs.branch }}' | |
git push -f -u origin '${{ github.event.inputs.branch }}' |