Skip to content

Commit 388d8b0

Browse files
authored
Create create-package.yml
1 parent 3130da2 commit 388d8b0

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/create-package.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
name: CI
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
split-upm:
11+
name: split upm branch (force)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: split upm branch
18+
run: |
19+
echo '### head info'
20+
git log -1
21+
echo '### delete local upm branch'
22+
git branch -d upm &> /dev/null || echo local upm branch not found
23+
echo
24+
echo '### split upm branch'
25+
git subtree split -P "$PKG_ROOT" -b upm
26+
echo '### checkout upm branch'
27+
git checkout upm
28+
echo '### list files'
29+
ls -l
30+
if [[ -d "Samples" ]]; then
31+
echo '### move Samples => Samples~'
32+
git mv Samples Samples~
33+
rm -f Samples.meta
34+
git config --global user.name 'github-bot'
35+
git config --global user.email '[email protected]'
36+
git commit -am "fix: Samples => Samples~"
37+
fi
38+
echo '### force overwrite remote upm branch'
39+
git push -f -u origin upm
40+
env:
41+
PKG_ROOT: Assets/Plugins

0 commit comments

Comments
 (0)