-
-
Notifications
You must be signed in to change notification settings - Fork 175
86 lines (85 loc) · 3.27 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
branches:
- master
jobs:
split-upm:
name: split upm branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: split upm branch
run: |
git branch -d upm &> /dev/null || echo upm branch not found # recreate the upm branch each time
git mv "$PKG_ROOT" "src/$UPM_ROOT"
git mv "src/$UPM_ROOT" .
git mv demo/Assets demo/Samples~
git mv demo/Samples~ $UPM_ROOT
git mv doc Docs
git mv Docs $UPM_ROOT
git mv LICENSE $UPM_ROOT
git mv README.md $UPM_ROOT
git mv SECURITY.md $UPM_ROOT
git mv CHANGELOG.md $UPM_ROOT
git mv CONTRIBUTING.md $UPM_ROOT
echo "********************** ROOT **********************"
ls
git add "$UPM_ROOT"
git config --global user.name 'github-bot'
git config --global user.email '[email protected]'
git commit -m "create release folder"
git subtree split -P "$UPM_ROOT" -b upm # create the upm branch
git checkout upm # checkout the branch
if [[ -d "Samples~/Packages" ]]; then
git rm -rf Samples~/Packages
git rm Samples~/Packages.meta --ignore-unmatch
git rm Samples~/packages.config
git rm Samples~/packages.config.meta --ignore-unmatch
fi
if [[ -d "Properties" ]]; then
git rm -rf Properties
git rm Properties.meta --ignore-unmatch
git rm Proyecto26.RestClient.csproj
git rm Proyecto26.RestClient.csproj.meta --ignore-unmatch
git rm Proyecto26.RestClient.nuspec
git rm Proyecto26.RestClient.nuspec.meta --ignore-unmatch
git rm packages.config
git rm packages.config.meta --ignore-unmatch
fi
git commit -am "fix: src => root"
echo "********************** ROOT **********************"
ls
git push -u origin upm --force # commit the branch
env:
PKG_ROOT: src/Proyecto26.RestClient
UPM_ROOT: Release
split-nuget:
name: split nuget branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: split nuget branch
run: |
git branch -d nuget &> /dev/null || echo nuget branch not found # recreate the nuget branch each time
git mv LICENSE $NUGET_ROOT
git mv README.md $NUGET_ROOT
git mv SECURITY.md $NUGET_ROOT
git mv CHANGELOG.md $NUGET_ROOT
git mv CONTRIBUTING.md $NUGET_ROOT
echo "********************** ROOT **********************"
ls
git config --global user.name 'github-bot'
git config --global user.email '[email protected]'
git subtree split -P "$NUGET_ROOT" -b nuget # create the nuget branch
git checkout nuget # checkout the branch
git commit -am "fix: src => root"
echo "********************** ROOT **********************"
ls
git push -u origin nuget --force # commit the branch
env:
NUGET_ROOT: src