-
Notifications
You must be signed in to change notification settings - Fork 6
70 lines (55 loc) · 1.95 KB
/
nightly_update_EN.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
name: Nightly Update (EN)
on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
container: docker://variantxyz/rgbds-20220711:1a126d774613431dd5eb568472493977a3682175
steps:
- name: List versions
run: |
git --version
python3 --version
rgbasm --version
rgblink --version
rgbgfx --version
- name: Checkout main repository
uses: actions/checkout@v2
with:
path: 'medarot3'
- name: Checkout baserom repository
uses: actions/checkout@v2
with:
repository: ${{ secrets.BASEROM3_REPOSITORY }}
ssh-key: ${{ secrets.BASEROM3_KEY }}
path: 'baserom'
- name: Copy baserom into main repository
run: |
cp $GITHUB_WORKSPACE/baserom/*.gbc $GITHUB_WORKSPACE/medarot3
- name: Checkout tr_EN
working-directory: 'medarot3'
run: |
git fetch --tags --all
git checkout tr_EN
- name: Get latest text from source
working-directory: 'medarot3'
env:
TRANSLATION_SHEET: sheet.xlsx
run: |
wget -q --no-check-certificate "${{ secrets.TRANSLATION_SHEET_URL_SOURCE }}" -O $TRANSLATION_SHEET
make csv_from_xlsx
git status --porcelain
- name: Push if there are changes
working-directory: 'medarot3'
run: |
[ -z "$(git status --porcelain)" ] && exit 0
make -j all
git config user.email "${{ secrets.USER_EMAIL }}"
git config user.name "$GITHUB_ACTOR"
git commit -am "Nightly text update - `date +%Y%m%d`"
mkdir patch
ips_util create baserom_kabuto.gbc medarot3_kabuto.gbc -o ./patch/m3kabuto-$GITHUB_RUN_NUMBER-$GITHUB_SHA.ips
ips_util create baserom_kuwagata.gbc medarot3_kuwagata.gbc -o ./patch/m3kuwagata-$GITHUB_RUN_NUMBER-$GITHUB_SHA.ips
git push