I've been struggling with this for way too long now, I can't find a way to achieve a really simple thing (at least that's what I thought).
My use case is this :
I'm a Unity dev, and I'm working on multiple UPM packages that can be installed by anyone using Unity's package manager. In a package, you can have a folder named (exactly) "Samples~", which then can be imported in a project when you downloaded this package using an UI button on the package manager :
The thing is, all folders named with a "~" at the end are hidden in the project view.
So, basically, what I need is : on my computer, the folder name should be "Samples", BUT on the release on git, the folder should be named "Samples~". Atm, using a github action I am able to rename Samples to Samples~ after every push, which is great ! But I cannot do the exact opposite, because there is no "pull" event for github actions...
Here is my script that works fine :
name: Rename tilded folders
on:
push:
branches:
- master
jobs:
rename_samples:
name: Create branches
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git checkout master
git config --global user.name 'github-bot'
git config --global user.email 'github-bot@users.noreply.github.com'
if [[ -d "Samples" ]]; then
git mv Samples Samples~
rm -f Samples.meta
git commit -am "rename: Samples => Samples~"
git push origin master
else
echo "${i}Samples does not exist"
fi
if [[ -d "Documentation" ]]; then
git mv Documentation Documentation~
rm -f Documentation.meta
git commit -am "rename: Documentation => Documentation~"
git push origin master
else
echo "${i}Documentation does not exist"
fi
Is there an easy way to achieve what I need (basically, have a different name in the git repo, or even better only in the release) ?
