-
Notifications
You must be signed in to change notification settings - Fork 6
80 lines (67 loc) · 2.23 KB
/
build.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
# Simply execute 'make' to verify things still build
name: Build All
on:
push:
branches:
- master
- 'tr_*'
# Allows running manually
workflow_dispatch:
inputs:
use-latest-translations:
required: false
default: true
description: 'Use latest translations from shared Google Docs sheet (default: true)'
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/medabots/medarot3:tr_EN
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: Get latest text from source
if: github.event.inputs.use-latest-translations == 'true'
working-directory: 'medarot3'
env:
TRANSLATION_SHEET: sheet.xlsx
run: |
wget -q --no-check-certificate "${{ secrets.TRANSLATION_SHEET_URL_SOURCE }}" -O $TRANSLATION_SHEET
make -j dump_xlsx
- name: Make all
working-directory: 'medarot3'
run: |
make -j all
- name: Generate BPS files
working-directory: 'medarot3'
run: |
flips --create baserom_kabuto.gbc medarot3_kabuto.gbc m3kabuto-$GITHUB_RUN_NUMBER-$GITHUB_SHA.bps
flips --create baserom_kuwagata.gbc medarot3_kuwagata.gbc m3kuwagata-$GITHUB_RUN_NUMBER-$GITHUB_SHA.bps
- name: 'Archive BPS files'
uses: actions/upload-artifact@v2
with:
name: patch_files
path: medarot3/*.bps
retention-days: 1
- name: Verify there are no uncommitted changes
if: github.event.inputs.use-latest-translations != 'true'
working-directory: 'medarot3'
run: |
[ -z "$(git status --porcelain)" ] && exit 0 || exit 1