Update push command in release.yaml #9
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: Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Merge release branch | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_BRANCH: release | |
run: | | |
mkdir -p ~/.ssh | |
ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts | |
git clone https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git repo | |
cd repo | |
# Set git user to the commit we are building from | |
git config user.email "$(git --no-pager log --format=format:'%an' -n 1)" | |
git config user.name "$(git --no-pager log --format=format:'%ae' -n 1)" | |
git checkout $RELEASE_BRANCH | |
git pull --rebase | |
git merge master | |
rm -Rf node_modules | |
npm install --production | |
du -h --max-depth=1 . | |
git add . | |
git commit --allow-empty -m "vendored release for $(git rev-parse master)" | |
git push origin -f $RELEASE_BRANCH |