-
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (57 loc) · 1.67 KB
/
dev-package.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Development Package
on:
push:
paths-ignore:
- '*.md'
jobs:
package:
name: Deploy package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create dev package branch
run: |
git branch -d dev-package &> /dev/null || echo dev-package branch not found
git subtree split -P "$PKG_ROOT" -b dev-package
if [[ -d "Assets/Samples" ]]; then
mv "Assets/Samples" /tmp/example
fi
if [[ -f "README.md" ]]; then
mv README.md /tmp/README.md
fi
if [[ -f "LICENSE.md" ]]; then
mv LICENSE.md /tmp/LICENSE.md
fi
if [[ -f "CHANGELOG.md" ]]; then
mv CHANGELOG.md /tmp/CHANGELOG.md
fi
git checkout dev-package
if [[ -d "/tmp/example" ]]; then
mkdir "Samples~"
mv /tmp/example/* "Samples~/"
git add "Samples~"
fi
if [[ -f "/tmp/LICENSE.md" ]]; then
mv /tmp/LICENSE.md LICENSE.md
git add LICENSE.md
fi
if [[ -f "/tmp/README.md" ]]; then
mv /tmp/README.md README.md
git add README.md
fi
if [[ -f "/tmp/CHANGELOG.md" ]]; then
mv /tmp/CHANGELOG.md CHANGELOG.md
git add CHANGELOG.md
fi
if [[ -d "Tests" ]]; then
rm -rf Tests
rm -f Tests.meta
fi
git config --global user.name 'github-bot'
git config --global user.email '[email protected]'
git commit -am "Packaged project"
git push -f -u origin dev-package
env:
PKG_ROOT: "Packages/se.hertzole.scriptable-values"