-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.02 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 $RELEASE_BRANCH