Skip to content

πŸš€ Release v1.0.6 #23

πŸš€ Release v1.0.6

πŸš€ Release v1.0.6 #23

Workflow file for this run

name: Release Nida
on:
release:
types: [published, edited]
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# ── Basis sounds (vaste selectie) ──────────────────────────────────────
- name: Define base sounds
run: |
SOUNDS="nida/sounds"
BASE_FILES=(
"$SOUNDS/Adhan [day] - Ahmed Saeed Al-Omrany.mp3"
"$SOUNDS/Adhan [day] - Amer Marei.mp3"
"$SOUNDS/Adhan [day] - Hafiz Fahad Shah.mp3"
"$SOUNDS/Adhan [fajr] - Ahmed Saeed Al-Omrany.mp3"
"$SOUNDS/Adhan [fajr] - Amer Marei.mp3"
"$SOUNDS/Adhan [fajr] - Hafiz Fahad Shah.mp3"
"$SOUNDS/Nida [jingle] - Announcement.mp3"
"$SOUNDS/Ramadan [tarhim] - Ustaz Hendra.mp3"
)
for f in "${BASE_FILES[@]}"; do
if [ -f "$f" ]; then
echo "βœ… $f"
else
echo "⚠️ Niet gevonden: $f"
fi
done
printf '%s\n' "${BASE_FILES[@]}" > /tmp/base_sounds.txt
# ── nida.zip β€” integratie inclusief kaart en basis sounds ──────────────
- name: Create nida.zip
run: |
# Integratie bestanden (zonder sounds map)
cd nida
zip -r ../nida.zip . \
--exclude "*.pyc" \
--exclude "__pycache__/*" \
--exclude ".DS_Store" \
--exclude "sounds/*"
cd ..
# Voeg Lovelace kaart toe onder www/ pad in de zip
if [ -f "www/nida-card.js" ]; then
zip nida.zip www/nida-card.js
echo "βœ… www/nida-card.js toegevoegd"
else
echo "⚠️ www/nida-card.js niet gevonden"
fi
# Voeg basis sounds toe
while IFS= read -r f; do
[ -f "$f" ] && zip nida.zip "$f" && echo "βž• $f"
done < /tmp/base_sounds.txt
echo "=== nida.zip inhoud ==="
unzip -l nida.zip
# ── Uitbreiding packs (automatisch op basis van [categorie]) ───────────
- name: Create extension packs
run: |
SOUNDS="nida/sounds"
# pack-adhan.zip β€” alle [day] en [fajr] bestanden
mapfile -t ADHAN < <(find "$SOUNDS" -iname "*.mp3" | grep -iE "\[(day|fajr)\]" | sort)
if [ ${#ADHAN[@]} -gt 0 ]; then
zip pack-adhan.zip "${ADHAN[@]}"
echo "βœ… pack-adhan.zip: ${#ADHAN[@]} bestanden"
fi
# pack-ramadan.zip β€” alle [tarhim] en [suhoor] bestanden
mapfile -t RAMADAN < <(find "$SOUNDS" -iname "*.mp3" | grep -iE "\[(salawat|suhoor)\]" | sort)
if [ ${#RAMADAN[@]} -gt 0 ]; then
zip pack-ramadan.zip "${RAMADAN[@]}"
echo "βœ… pack-ramadan.zip: ${#RAMADAN[@]} bestanden"
fi
# pack-jingles.zip β€” alle [jingle] bestanden
mapfile -t JINGLES < <(find "$SOUNDS" -iname "*.mp3" | grep -iE "\[jingle\]" | sort)
if [ ${#JINGLES[@]} -gt 0 ]; then
zip pack-jingles.zip "${JINGLES[@]}"
echo "βœ… pack-jingles.zip: ${#JINGLES[@]} bestanden"
fi
# ── Upload naar release ─────────────────────────────────────────────────
- name: Upload to release
uses: softprops/action-gh-release@v1
with:
files: |
nida.zip
pack-adhan.zip
pack-ramadan.zip
pack-jingles.zip
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}