3DS Twitvh - sgml/signature GitHub Wiki

+-----------------+
| GitHub Repo     |
| mappings.json   |
| payload files   |
+--------+--------+
         |
         v
+-----------------+
| GitHub Action   |
| publishes JSON  |
| and payloads    |
+--------+--------+
         |
         v
+-----------------+
| Local Python    |
| bridge daemon   |
+--------+--------+
         |
      FTP client
         |
         v
+-----------------+
| 3DS FTP Server  |
| (homebrew)      |
+-----------------+

3DS Config Mapping JSON

{
  "targets": {
    "cia_latest": {
      "source": "builds/app.cia",
      "destination": "/cias/app.cia"
    },
    "config": {
      "source": "configs/settings.json",
      "destination": "/3ds/myapp/settings.json"
    }
  }
}

FTP Mapping JSON

{
  "ftp_host": "192.168.1.50",
  "ftp_port": 5000,
  "mappings": "mappings.json"
}

Github Action YAML

name: Publish Manifest

on:
  workflow_dispatch:
    inputs:
      target:
        required: true
        type: string

jobs:
  publish:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Build request
        run: |
          mkdir out

          cat > out/request.json <<EOF
          {
            "target":"${{ github.event.inputs.target }}"
          }
          EOF

      - uses: actions/upload-artifact@v4
        with:
          name: request
          path: out/request.json