Compare commits

..

3 Commits

Author SHA1 Message Date
04362c6e0c Added CI 2026-02-11 17:06:19 +01:00
8457cdd5a6 Keeping UltraHand packages on Update 2026-02-11 17:06:09 +01:00
d1f78968a4 Added wait warning 2026-02-11 16:50:22 +01:00
4 changed files with 84 additions and 3 deletions

71
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
name: Build and Release
on:
push:
tags:
- 'v*'
jobs:
build-and-release:
runs-on: ubuntu-latest
container:
image: devkitpro/devkitarm:20251231
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build payload
env:
DEVKITARM: /opt/devkitpro/devkitARM
run: make
- name: Create release and upload asset
env:
SERVER_URL: ${{ github.server_url }}
API_URL: ${{ github.api_url }}
REPOSITORY: ${{ github.repository }}
GITHUB_REF: ${{ github.ref }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${GITHUB_REF#refs/tags/}"
BIN_PATH="output/OmniNX-Installer.bin"
# API URL: GitHub uses api.github.com, Gitea uses server_url/api/v1
if [[ "$API_URL" != "" ]]; then
API_BASE="$API_URL"
else
API_BASE="$SERVER_URL/api/v1"
fi
# Create release
RELEASE_RESPONSE=$(curl -s -X POST \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"$TAG\", \"name\": \"$TAG\", \"body\": \"OmniNX Installer Payload $TAG\"}" \
"$API_BASE/repos/$REPOSITORY/releases")
RELEASE_ID=$(echo "$RELEASE_RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)
UPLOAD_URL=$(echo "$RELEASE_RESPONSE" | grep -o '"upload_url":"[^"]*' | head -1 | cut -d'"' -f4)
if [ -z "$RELEASE_ID" ]; then
echo "Failed to create release. Response: $RELEASE_RESPONSE"
exit 1
fi
# Upload asset (GitHub uses upload_url; Gitea uses assets endpoint)
if [[ -n "$UPLOAD_URL" ]]; then
UPLOAD_URL="${UPLOAD_URL%%\{*}"
curl -X POST \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/octet-stream" \
--data-binary "@$BIN_PATH" \
"${UPLOAD_URL}?name=OmniNX-Installer.bin"
else
curl -X POST \
-H "Authorization: token $TOKEN" \
-F "attachment=@$BIN_PATH" \
"$API_BASE/repos/$REPOSITORY/releases/$RELEASE_ID/assets?name=OmniNX-Installer.bin"
fi

View File

@@ -52,7 +52,15 @@ make clean
make
```
The built payload will be output to `output/omninx-installer.bin`.
The built payload will be output to `output/OmniNX-Installer.bin`.
### CI / GitHub Actions
Pushing a version tag (e.g. `v1.0.0`) triggers a build and creates a release with the `.bin` file attached.
**GitHub:** Uses the built-in `GITHUB_TOKEN` automatically.
**Gitea:** Add a `GITHUB_TOKEN` secret (Settings → Secrets and Variables → Actions) with a token that has permission to create releases.
## Usage

View File

@@ -124,7 +124,6 @@ static const char* config_dirs_to_delete[] = {
// Switch directories to delete
static const char* switch_dirs_to_delete[] = {
"sd:/switch/.overlays",
"sd:/switch/.packages",
"sd:/switch/90DNS_tester",
"sd:/switch/aio-switch-updater",
"sd:/switch/amsPLUS-downloader",

View File

@@ -434,7 +434,10 @@ void ipl_main(void) {
// Perform the installation
set_color(COLOR_YELLOW);
gfx_printf("Installation wird gestartet...\n\n");
gfx_printf("Installation wird gestartet...\n");
set_color(COLOR_WHITE);
set_color(COLOR_ORANGE);
gfx_printf("Hinweis: Manchmal könnte es hängen. Einfach warten.\n\n");
set_color(COLOR_WHITE);
int result = perform_installation(pack_variant, mode);