-
Notifications
You must be signed in to change notification settings - Fork 51
96 lines (87 loc) · 3.61 KB
/
publish-eo-lich5.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
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
name: Publish to EO-Lich5
on:
# workflow_dispatch:
push:
branches: [ 'master' ]
paths:
- 'type_data/**'
- 'scripts/spell-list.xml'
- 'scripts/alias.lic'
- 'scripts/autostart.lic'
- 'scripts/go2.lic'
- 'scripts/infomon.lic'
- 'scripts/jinx.lic'
- 'scripts/lich5-update.lic'
- 'scripts/log.lic'
- 'scripts/repository.lic'
- 'scripts/vars.lic'
- 'scripts/version.lic'
- 'scripts/xnarost.lic'
# - 'scripts/narost.lic'
# - 'scripts/lnet.lic'
jobs:
publish:
runs-on: ubuntu-latest
name: Publish gameobj-data and scripts
steps:
- name: Checkout EO-Scripts
uses: actions/checkout@v2
with:
fetch-depth: '20'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Setup bundler cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Update apt repo sources
run: sudo apt-get update -y
- name: Install xmllint
run: sudo apt-get install libxml2-utils
- name: Install ruby gem dependencies with bundler
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run type data migrations to create gameobj-data.xml
run: |
bin/migrate
- name: Copy gameobj-data.xml and scripts for EO-Lich5
run: |
mkdir /home/runner/work/scripts/lich5
mkdir /home/runner/work/scripts/lich5/data
mkdir /home/runner/work/scripts/lich5/scripts
cp dist/gameobj-data.xml /home/runner/work/scripts/lich5/data
cp scripts/spell-list.xml /home/runner/work/scripts/lich5/data
cp scripts/alias.lic /home/runner/work/scripts/lich5/scripts
cp scripts/autostart.lic /home/runner/work/scripts/lich5/scripts
cp scripts/go2.lic /home/runner/work/scripts/lich5/scripts
cp scripts/infomon.lic /home/runner/work/scripts/lich5/scripts
cp scripts/jinx.lic /home/runner/work/scripts/lich5/scripts
cp scripts/lich5-update.lic /home/runner/work/scripts/lich5/scripts
cp scripts/log.lic /home/runner/work/scripts/lich5/scripts
cp scripts/repository.lic /home/runner/work/scripts/lich5/scripts
cp scripts/vars.lic /home/runner/work/scripts/lich5/scripts
cp scripts/version.lic /home/runner/work/scripts/lich5/scripts
cp scripts/xnarost.lic /home/runner/work/scripts/lich5/scripts
# cp scripts/narost.lic /home/runner/work/scripts/lich5/scripts
# cp scripts/lnet.lic /home/runner/work/scripts/lich5/scripts
- name: Checkout EO-Lich5
uses: actions/checkout@v2
with:
repository: elanthia-online/lich-5
token: ${{secrets.PAT_FOR_JINX_PUSH}}
- name: Pushes GameObj-data.xml and scripts to EO-Lich5
run: |
cp /home/runner/work/scripts/lich5/data/* /home/runner/work/scripts/scripts/data/
cp /home/runner/work/scripts/lich5/scripts/* /home/runner/work/scripts/scripts/scripts/
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git add data
git add scripts
git commit -m "Automatic publish from github.com/elanthia-online/scripts"
git push