-
Notifications
You must be signed in to change notification settings - Fork 0
163 lines (135 loc) · 6.58 KB
/
Copy pathrelease.yml
File metadata and controls
163 lines (135 loc) · 6.58 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Compila el asistente Wii y publica una release con el paquete listo para la tarjeta SD.
#
# Se dispara al empujar una etiqueta vX.Y.Z. Lo primero que hace es comprobar que la etiqueta y
# las versiones de los ficheros dicen lo mismo, porque una release mal etiquetada hay que
# retirarla a mano.
name: Publicar una release
on:
push:
tags: ['v*']
workflow_dispatch:
permissions:
contents: write
jobs:
versiones:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.leer.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: leer
run: |
# En workflow_dispatch no hay etiqueta: se comprueba solo que los ficheros coincidan.
etiqueta=""
[[ "${{ github.ref_type }}" == "tag" ]] && etiqueta="${{ github.ref_name }}"
./tools/version.sh $etiqueta
version="$(sed -n 's/^#define AW_VERSION "\(.*\)"$/\1/p' aw/source/main.c)"
echo "version=$version" >> "$GITHUB_OUTPUT"
# La web va dentro del paquete para que la Wii pueda servirla: asi se usa sin internet y sin
# depender de GitHub Pages. Se compila con base '/' porque la consola la sirve en la raiz.
web:
needs: versiones
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: ania/package-lock.json
- run: npm ci
working-directory: ania
- run: npm test
working-directory: ania
- run: npm run build
working-directory: ania
- uses: actions/upload-artifact@v4
with:
name: web
path: ania/dist
homebrew:
needs: web
runs-on: ubuntu-latest
# La imagen oficial de devkitPro trae el compilador de PowerPC y libogc ya montados en
# /opt/devkitpro, que es donde package.sh los busca por defecto.
container: devkitpro/devkitppc:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: web
path: web
# package.sh es el mismo que se usa a mano: compila con make, valida que el icono mida
# 128x48 y monta dist/apps/aniaplus. --web-dir le pasa la web ya compilada del paso
# anterior, para no necesitar Node dentro de este contenedor.
- run: ./package.sh --web-dir "$GITHUB_WORKSPACE/web"
working-directory: aw
- uses: actions/upload-artifact@v4
with:
name: paquete
path: aw/dist
publicar:
needs: [versiones, homebrew]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: paquete
path: paquete
# El zip se hace aqui y no en el contenedor de devkitPro, que no trae `zip`. Dentro va la
# carpeta `apps` tal cual, para que descomprimir en la raiz de la SD deje todo en su sitio.
- name: Empaquetar
id: zip
run: |
version="${{ needs.versiones.outputs.version }}"
nombre="aniaplus-$version-wii.zip"
( cd paquete && zip -qr "../$nombre" apps )
echo "nombre=$nombre" >> "$GITHUB_OUTPUT"
unzip -l "$nombre"
- uses: softprops/action-gh-release@v2
with:
files: ${{ steps.zip.outputs.nombre }}
name: ANIA+ ${{ needs.versiones.outputs.version }}
body: |
Wii assistant **${{ needs.versiones.outputs.version }}**, with ANIA+ **${{ needs.versiones.outputs.version }}** inside.
## Install
1. Extract `${{ steps.zip.outputs.nombre }}` to the **root of the SD card**. You should end up with `apps/aniaplus/boot.dol`.
2. Put the SD card in the Wii and open the **Homebrew Channel**.
3. Launch *ANIA+ Asistente Wii*. The console's IP address appears on screen.
4. Go to <https://ferdinandoph.github.io/aniaplus/> and type that IP into the *Wii*
tab. With no internet, but with a local network, open the address the console
itself serves instead: `http://WII-IP-ADDRESS:8080/`.
The package ships the web app inside it, so it also works with no internet at all.
## Before you start
- You need the **Homebrew Channel**, and to launch the assistant from there: PBR's save
belongs to a different title, and to get in the assistant patches the already-running
IOS in memory. There is nothing to install.
If you launch it from somewhere else — a forwarder, a game loader, an old Homebrew
Channel — you will need a **cIOS (249 or 250)** installed.
- The device you edit from must be on the **same local network** as the Wii.
- You must have booted Pokémon Battle Revolution at least once, so the save exists.
<details>
<summary><b>Español</b></summary>
Asistente Wii **${{ needs.versiones.outputs.version }}**, con ANIA+ **${{ needs.versiones.outputs.version }}** dentro.
### Instalar
1. Descomprime `${{ steps.zip.outputs.nombre }}` en la **raíz de la tarjeta SD**. Tiene que quedar `apps/aniaplus/boot.dol`.
2. Mete la SD en la Wii y abre el **Homebrew Channel**.
3. Lanza *ANIA+ Asistente Wii*. En pantalla saldrá la IP de la consola.
4. Entra en <https://ferdinandoph.github.io/aniaplus/> y escribe esa IP en la pestaña
*Wii*. Si no tienes internet, pero sí red local, abre la dirección que sirve la
propia consola: `http://IP-DE-LA-WII:8080/`.
El paquete lleva la web dentro, así que también funciona sin internet ninguno.
### Antes de empezar
- Hace falta el **Homebrew Channel**, y lanzar el asistente desde ahí: el guardado de
PBR pertenece a otro título, y para que la consola deje entrar el asistente parchea
en memoria el IOS que ya está corriendo. No hay nada que instalar.
Si lo lanzas desde otro sitio —un forwarder, un cargador de juegos, un Homebrew
Channel antiguo— hará falta un **cIOS (249 o 250)** instalado.
- El dispositivo desde el que edites tiene que estar en la **misma red local** que la Wii.
- Haber arrancado Pokémon Battle Revolution al menos una vez, para que exista el guardado.
</details>
---
Free software: the web app under GPLv3 and the Wii assistant under GPLv2 (the `.zip`
carries the text in `apps/aniaplus/LICENSE`). The source is in this repository.
Commit: ${{ github.sha }}