Skip to content

ci: fix not being able to execute fix paths script #33

ci: fix not being able to execute fix paths script

ci: fix not being able to execute fix paths script #33

Workflow file for this run

name: Development Package
on:
push:
paths-ignore:
- '*.md'
jobs:
package:
name: Deploy package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create dev package branch
run: |
git branch -d dev-package &> /dev/null || echo dev-package branch not found
git subtree split -P "$PKG_ROOT" -b dev-package
if [[ -d "Assets/Samples" ]]; then
mv "Assets/Samples" /tmp/example
fi
if [[ -f "README.md" ]]; then
mv README.md /tmp/README.md
fi
if [[ -f "LICENSE.md" ]]; then
mv LICENSE.md /tmp/LICENSE.md
fi
if [[ -f "CHANGELOG.md" ]]; then
mv CHANGELOG.md /tmp/CHANGELOG.md
fi
git checkout dev-package
if [[ -d "/tmp/example" ]]; then
mkdir "Samples~"
mv /tmp/example/* "Samples~/"
git add "Samples~"
fi
if [[ -f "/tmp/LICENSE.md" ]]; then
mv /tmp/LICENSE.md LICENSE.md
git add LICENSE.md
fi
if [[ -f "/tmp/README.md" ]]; then
mv /tmp/README.md README.md
git add README.md
fi
if [[ -f "/tmp/CHANGELOG.md" ]]; then
mv /tmp/CHANGELOG.md CHANGELOG.md
git add CHANGELOG.md
fi
if [[ -d "Tests" ]]; then
rm -rf Tests
rm -f Tests.meta
fi
git config --global user.name 'github-bot'
git config --global user.email '[email protected]'
git commit -am "Packaged project"
git push -f -u origin dev-package
env:
PKG_ROOT: "Packages/se.hertzole.scriptable-values"