0
0
镜像自地址 https://github.com/THZoria/NX_Firmware.git 已同步 2026-04-09 10:41:13 +00:00

比较提交

...

11 次代码提交

作者 SHA1 备注 提交日期
Zoria
35141cd068 Enhance firmware version check for Switch 1
Updated the firmware version check to include version 21.0.0 and modified output messages for clarity.
2026-01-24 21:25:42 +01:00
Zoria
99860219d6 Enhance firmware autodl workflow with changelog check
Added check for changelog existence before reading.
2026-01-24 21:21:43 +01:00
Zoria
484397aaa8 Fix firmware version check and tag existence logic 2026-01-24 21:18:38 +01:00
Zoria
f145465763 Update version check logic in firmware-autodl.yml 2026-01-24 21:16:41 +01:00
Zoria
0f244f1ced Refactor firmware version check in workflow 2026-01-24 21:15:06 +01:00
Zoria
4fea53b06b Fix zip command and version check in workflow 2026-01-24 21:10:25 +01:00
Zoria
c9de5c55c5 Refactor firmware autodl workflow for clarity and efficiency
Updated the workflow to install Python dependencies separately and improved the logic for checking firmware versions and creating releases.
2026-01-24 21:05:26 +01:00
Zoria
818be8376e Refactor firmware workflow for version handling 2026-01-24 21:00:59 +01:00
Zoria
f5d2b4e265 Refactor firmware download workflow steps 2026-01-24 20:56:51 +01:00
Zoria
cfcf5e0da6 Enhance README with badges for Discord and version
Added Discord and version badges to README.
2026-01-15 19:30:17 +01:00
Zoria
ef691f15ff Create firmware zip while excluding variant files
Add step to create firmware zip excluding .nca.1 files
2026-01-13 08:22:10 +01:00
修改 2 个文件,包含 32 行新增18 行删除

查看文件

@@ -31,33 +31,34 @@ jobs:
cp hactool-linux hactool
chmod +x hactool
- name: 🔍 Check firmware version (Switch 1 only)
- name: 🔍 Check firmware version (Switch 1 only, 21.0.0+)
id: version_check
run: |
LATEST_TITLE=$(curl -s 'https://yls8.mtheall.com/ninupdates/feed.php' | \
grep '<title>Switch ' | \
grep -v '<title>Switch 2 ' | \
grep -E 'Switch ([2-9][1-9]|[3-9][0-9])\.' | \
head -n 1)
if [ -z "$LATEST_TITLE" ]; then
echo "::error::Could not retrieve the firmware title for Switch 1 from the RSS feed."
exit 1
fi
LATEST_VERSION=$(echo "$LATEST_TITLE" | grep -oP 'Switch \K[0-9.]+')
if [ -z "$LATEST_VERSION" ]; then
echo "::error::Failed to parse LATEST_VERSION from title: $LATEST_TITLE"
exit 1
echo "INFO: Aucune version récente (>= 21.x) trouvée."
echo "new_version=false" >> $GITHUB_OUTPUT
exit 0
fi
TAG_EXISTS=$(git ls-remote --tags origin $LATEST_VERSION)
echo "Version détectée : $LATEST_VERSION"
if [ ! -z "$TAG_EXISTS" ]; then
echo "INFO: Tag $LATEST_VERSION already exists on GitHub. Stopping workflow to avoid re-upload."
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/tags/$LATEST_VERSION")
if [ "$HTTP_STATUS" == "200" ]; then
echo "INFO: La release $LATEST_VERSION existe déjà."
echo "new_version=false" >> $GITHUB_OUTPUT
else
echo "INFO: New version $LATEST_VERSION found! Preparing to download..."
echo "INFO: Nouvelle version $LATEST_VERSION détectée !"
echo "new_version=true" >> $GITHUB_OUTPUT
fi
shell: bash
@@ -67,13 +68,20 @@ jobs:
if: steps.version_check.outputs.new_version == 'true'
run: |
python3 firmware_downloader.py | tee firmware_output.txt
FIRMWARE_VERSION=$(grep 'Folder: Firmware ' firmware_output.txt | awk '{print $NF}')
echo "firmware_version=$FIRMWARE_VERSION" >> $GITHUB_OUTPUT
tail -n 4 firmware_output.txt > changelog_body.txt
- name: 🧹 Clean .nca files
if: steps.version_check.outputs.new_version == 'true'
run: |
find . -type f -name "*.nca.*" -delete
VERSION="${{ steps.download.outputs.firmware_version }}"
if [ -d "Firmware $VERSION" ]; then
rm -f "Firmware $VERSION.zip"
zip -rj "Firmware $VERSION.zip" "Firmware $VERSION/" -i "*.nca"
fi
- name: 📝 Prepare Release Body
id: prepare_body
if: steps.version_check.outputs.new_version == 'true'
@@ -81,8 +89,10 @@ jobs:
with:
script: |
const fs = require('fs');
const changelogBody = fs.readFileSync('changelog_body.txt', 'utf8');
core.setOutput('release_body', changelogBody);
if (fs.existsSync('changelog_body.txt')) {
const changelogBody = fs.readFileSync('changelog_body.txt', 'utf8');
core.setOutput('release_body', changelogBody);
}
- name: 📦 Create Tag and Release
if: steps.version_check.outputs.new_version == 'true'

查看文件

@@ -6,6 +6,10 @@ Firmware database for a discord bot
<img width="618" height="670" alt="image" src="https://github.com/user-attachments/assets/279d9c21-0712-4ea8-927b-c6bb9789bb1b" />
[![Discord](https://img.shields.io/discord/454099185416011776?label=Rejoindre%20le%20Discord&logo=discord&logoColor=white&style=for-the-badge)](https://discord.sighya.fr) <br>
[![Dernière version](https://img.shields.io/github/v/release/THZoria/NX_Firmware?label=Dernière%20Version&color=05c09a&style=for-the-badge)](https://github.com/THZoria/NX_Firmware/releases/latest)
[![Téléchargements](https://img.shields.io/github/downloads/THZoria/NX_Firmware/total?label=Téléchargements&color=blue&style=for-the-badge)](https://github.com/THZoria/NX_Firmware)
# How to update a modified Switch / Under custom firmware
- Create a folder at the root of your microSD card and name it whatever you want.