dump release trick specific to actions node_modules management
This commit is contained in:
parent
7ab8811117
commit
722f21acbd
1 changed files with 17 additions and 0 deletions
17
release.sh
Executable file
17
release.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
# actions requires a node_modules dir https://github.com/actions/toolkit/blob/master/docs/javascript-action.md#publish-a-releasesv1-action
|
||||
# but its recommended not to check these in https://github.com/actions/toolkit/blob/master/docs/action-versioning.md#recommendations
|
||||
# as such the following hack is how we dill with it
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "please pass a release version. i.e. $0 v1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git checkout -b releases/$1 # If this branch already exists, omit the -b flag
|
||||
rm -rf node_modules
|
||||
sed -i '/node_modules/d' .gitignore # Bash command that removes node_modules from .gitignore
|
||||
npm install --production
|
||||
git add node_modules .gitignore
|
||||
git commit -m node_modules
|
||||
git push origin releases/$1
|
Loading…
Reference in a new issue