name: Build module (Without telegram post) on: workflow_dispatch: inputs: tag: description: "Tag for the release (x.x.x)" required: true type: string version: description: "Module version (x.x)" required: true type: string version_code: description: "Module version code (xx)" required: true type: string release_name: description: "Release Name" required: true type: string release_changes: description: "Release Changes" required: true type: string jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Make build dirs run: mkdir -p zaprett/system/bin zaprett-hosts/system/bin zaprett-tv/system/bin zaprett/system/etc/zaprett/lists zapret-latest out lists zapret-hosts/system/etc/zaprett/lists zapret-tv/system/etc/zaprett/lists - name: Download latest zapret binaries run: | LATEST_RELEASE=$(curl -s https://api.github.com/repos/bol-van/zapret/releases/latest) DOWNLOAD_URL=$(echo "$LATEST_RELEASE" | grep -o 'browser_download_url.*zapret-v.*\.zip"' | cut -d'"' -f3) wget $DOWNLOAD_URL -O zapret-latest.zip - name: Unzip zapret binaries run: | unzip -o zapret-latest.zip ZAPRET_DIR=$(find . -maxdepth 1 -type d -name 'zapret-v*' | head -n 1) if [ "$(ls -A "$ZAPRET_DIR")" ]; then mv "$ZAPRET_DIR"/* zapret-latest/ else echo "Warning: $ZAPRET_DIR is empty" fi rm -rf "${ZAPRET_DIR}" rm zapret-latest.zip - name: Copy files to dirs run: | #copy nfqws and zaprett cp zapret-latest/binaries/android-arm/nfqws zaprett/system/bin/nfqws_arm32 cp zapret-latest/binaries/android-arm64/nfqws zaprett/system/bin/nfqws_arm64 cp zapret-latest/binaries/android-x86/nfqws zaprett/system/bin/nfqws_x86 cp zapret-latest/binaries/android-x86_64/nfqws zaprett/system/bin/nfqws_x86_64 cp zapret-latest/binaries/linux-mips/nfqws zaprett/system/bin/nfqws_mips cp zapret-latest/binaries/linux-mipsel/nfqws zaprett/system/bin/nfqws_mipsel cp -a src-module/* zaprett/ #copy all files to another distributions cp -r zaprett/* zaprett-hosts/ cp -r zaprett/* zaprett-tv/ - name: Download and copy actual lists run: | wget https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/lists/include/list-youtube.txt -O lists/list-youtube.txt wget https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/lists/include/list-discord.txt -O lists/list-discord.txt cp lists/list-youtube.txt zaprett/system/etc/zaprett/lists/ cp lists/list-youtube.txt zaprett-hosts/system/etc/zaprett/lists/ cp lists/list-youtube.txt zaprett-tv/system/etc/zaprett/lists/ cp lists/list-discord.txt zaprett/system/etc/zaprett/lists/ cp lists/list-discord.txt zaprett-hosts/system/etc/zaprett/lists/ cp hosts/hosts zaprett-hosts/system/etc - name: Create module.prop run: | cat > zaprett/module.prop < zaprett-hosts/module.prop < zaprett-tv/module.prop < changelog.md - name: Update update.json run: | cat > update.json < update_hosts.json < update_tv.json <