-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (105 loc) · 3.33 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: CI
on:
push:
branches:
- master
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Semantic release
id: semantic
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
branch: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create upm branch
run: |
git branch -d upm &> /dev/null || echo upm branch not found
cp "$CHANGELOG" "$CHANGELOG_COPY"
cp "$CHANGELOG_META" "$CHANGELOG_META_COPY"
cp "$README" "$README_COPY"
cp "$README_META" "$README_META_COPY"
git subtree split -P "$PKG_ROOT" -b upm
git checkout upm
mv "$CHANGELOG_COPY" "$CHANGELOG"
mv "$CHANGELOG_META_COPY" "$CHANGELOG_META"
mv "$README_COPY" "$README"
mv "$README_META_COPY" "$README_META"
git add "$CHANGELOG"
git add "$CHANGELOG_META"
git add "$README"
git add "$README_META"
git config --global user.name 'github-bot'
git config --global user.email '[email protected]'
git commit -am "fix: Copy changelog and readme"
if [[ -d "Samples" ]]; then
git mv Samples Samples~
rm -f Samples.meta
git config --global user.name 'github-bot'
git config --global user.email '[email protected]'
git commit -am "fix: Samples => Samples~"
fi
git push -f -u origin upm
env:
PKG_ROOT: Packages/uGUI-Skinner
CHANGELOG: CHANGELOG.md
CHANGELOG_META: CHANGELOG.md.meta
CHANGELOG_COPY: cnglg.copy
CHANGELOG_META_COPY: cnglgm.copy
README: README.md
README_META: README.md.meta
README_COPY: rdm.copy
README_META_COPY: rdmmt.copy
- name: Create upm git tag
if: steps.semantic.outputs.new_release_published == 'true'
run: |
git tag $TAG upm
git push origin --tags
env:
TAG: upm/v${{ steps.semantic.outputs.new_release_version }}
create_document:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: remove samples
run : |
rm -rf Samples
- name: gh-paged ls
run: |
ls
- uses: mattnotmitt/doxygen-action@v1
with:
working-directory: '.'
doxyfile-path: './Doxyfile'
- name: gh-paged ls 2
run: |
ls
- name: gh-paged commit
run: |
git branch -d gh-pages &> /dev/null || echo gh-pages branch not found
git checkout --orphan gh-pages
# docs/と.git等以外を全て削除
ls | grep -v -E 'Doxyfile|html' | xargs rm -rf
rm -rf .gitignore
rm -rf .gitattributes
rm -rf .editorconfig
git config --global user.name 'github-bot'
git config --global user.email '[email protected]'
git commit -am "docs: remove all"
cp -rf html docs
git add docs/*
git commit -m "docs: generate doxygen"
git push -f -u origin gh-pages
env:
PKG_ROOT: Packages/uGUI-Skinner