[OpenUPM/Github Packages] Fix npm prepublishOnly script error
Fixed OpenUpm: Build pipeline for version 0.1.1 that shows an error when try run the pipeline job: Publish to OpenUPM
TIP: This release
0.1.3is just a replacement of0.1.2because the OpenUPM pipeline for publishing failed. But In essence, the tags are almost the "same".
The fix consists in rewrite the file .env on [upm] branch to REPOSITORY_ROOT=. only from Github Actions CI, and bypass the prepublishOnly script. This one is required only for manually publishing from a local repo (development environment)
Build pipelines summary from: https://openupm.com/packages/com.benoitfreslon.vibration
Build pipeline failure.
ADDED
- Added new function
fixEnvFile()to.github/scripts/functions.shshell script, in order to rewrite the root.envfile - Added new function
checkPkgRoot()to verify and define the$PKG_ROOTenvironment variable
CHANGED
- Renamed environment variables names to UPPER CASE on
.github/workflows/main.yml - Added
.envfiles, in order to define where is the REPOSITORY_ROOT.PS: This is important because, in a embedded package branch (
[upm-package-embedded]) with a Unity project, usually the root doesn't contains the UPM package files. - Updated README.md with
npm scriptsandnodeinstallation documentation

