-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (71 loc) · 2.95 KB
/
Copy pathrelease.yml
File metadata and controls
80 lines (71 loc) · 2.95 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
# Release flow: push a tag like v0.4.0 (or run manually) and this builds
# the RELEASE binary (no dev scaffolding), packages the .cia, generates the
# FBI Remote-Install QR pointing at the release asset, and publishes a
# GitHub Release with each file as an individual asset — the layout
# Universal-DB's update scripts consume directly.
name: release
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
container: devkitpro/devkitarm:latest
steps:
- uses: actions/checkout@v4
- name: Install packaging tools (makerom, bannertool, segno)
run: |
# makerom release binaries also need a newer glibc — build from source
git clone --depth 1 --branch makerom-v0.19.0 \
https://github.com/3DSGuy/Project_CTR /tmp/Project_CTR
make -C /tmp/Project_CTR/makerom -j4 deps
make -C /tmp/Project_CTR/makerom -j4
install /tmp/Project_CTR/makerom/bin/makerom /usr/local/bin/makerom
apt-get update -qq && apt-get install -y -qq python3-pip cmake g++
# bannertool: release binaries need a newer glibc than this
# container ships, so build from source (with the VLA-init fix)
curl -sL -o /tmp/bannertool.tar.gz \
https://github.com/carstene1ns/3ds-bannertool/releases/download/1.2.3/bannertool-1.2.3.tar.gz
tar xzf /tmp/bannertool.tar.gz -C /tmp
cd /tmp/bannertool-1.2.3
sed -i 's/u8 pad\[padLength\] = {0};/u8 pad[4] = {0};/' source/3ds/lz11.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j4
install build/bannertool /usr/local/bin/bannertool
pip3 install --break-system-packages segno || pip3 install segno
- name: Build libssh2 (SSH support)
run: |
dkp-pacman -S --noconfirm 3ds-mbedtls
bash tools/build_libssh2.sh
- name: Build RELEASE .3dsx + .cia
run: make RELEASE=1 cia MAKEROM=makerom BANNERTOOL=bannertool
- name: Generate install QR
run: |
TAG="${GITHUB_REF_NAME}"
python3 tools/make_qr.py \
"https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAG}/3dBBS.cia" \
qr-install.png
- name: Publish release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
3dBBS.cia
3dBBS.3dsx
qr-install.png
body: |
Scan `qr-install.png` with FBI's Remote Install to install the
`.cia` over the air, or launch `3dBBS.3dsx` from the Homebrew
Launcher. Release builds contain no dev scaffolding.
- name: Upload artifacts (manual runs)
uses: actions/upload-artifact@v4
if: "!startsWith(github.ref, 'refs/tags/')"
with:
name: 3dBBS
path: |
3dBBS.cia
3dBBS.3dsx
qr-install.png