From 3edfe8e8bb7d93bbb3f2ca37aca220ca4f7397aa Mon Sep 17 00:00:00 2001 From: zarzet Date: Tue, 20 Jan 2026 09:56:38 +0700 Subject: [PATCH] docs: update README and release workflow --- .github/workflows/release.yml | 95 +++++++++++++++++++++++++++++++++++ README.md | 14 +++++- 2 files changed, 107 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d79b15f..9938d2c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -412,3 +412,98 @@ jobs: prerelease: ${{ needs.get-version.outputs.is_prerelease == 'true' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + notify-telegram: + runs-on: ubuntu-latest + needs: [get-version, create-release] + if: ${{ needs.get-version.outputs.is_prerelease != 'true' }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Download Android APK + uses: actions/download-artifact@v4 + with: + name: android-apk + path: ./release + + - name: Extract changelog for version + id: changelog + run: | + VERSION=${{ needs.get-version.outputs.version }} + VERSION_NUM=${VERSION#v} + + # Extract changelog, limit to ~1500 chars for Telegram (4096 limit minus message overhead) + FULL_CHANGELOG=$(sed -n "/^## \[$VERSION_NUM\]/,/^## \[/{ /^## \[$VERSION_NUM\]/d; /^## \[/d; p; }" CHANGELOG.md | sed '/^---$/d') + + if [ -z "$FULL_CHANGELOG" ]; then + CHANGELOG="See release notes on GitHub for details." + else + # Take first 1500 characters, then cut at last complete line + CHANGELOG=$(echo "$FULL_CHANGELOG" | head -c 1500 | sed '$d') + + # Check if truncated + FULL_LEN=${#FULL_CHANGELOG} + if [ $FULL_LEN -gt 1500 ]; then + CHANGELOG="${CHANGELOG}"$'\n\n... (see full changelog on GitHub)' + fi + fi + + echo "$CHANGELOG" > /tmp/changelog.txt + + - name: Send to Telegram Channel + env: + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + TELEGRAM_CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }} + run: | + VERSION=${{ needs.get-version.outputs.version }} + CHANGELOG=$(cat /tmp/changelog.txt) + + # Find APK files + ARM64_APK=$(find ./release -name "*arm64*.apk" | head -1) + ARM32_APK=$(find ./release -name "*arm32*.apk" | head -1) + + # Prepare message with changelog + printf '%s\n' \ + "*SpotiFLAC ${VERSION} Released!*" \ + "" \ + "*What's New:*" \ + "${CHANGELOG}" \ + "" \ + "*Download:*" \ + "- [arm64 APK](https://github.com/${{ github.repository }}/releases/download/${VERSION}/SpotiFLAC-${VERSION}-arm64.apk) (recommended)" \ + "- [arm32 APK](https://github.com/${{ github.repository }}/releases/download/${VERSION}/SpotiFLAC-${VERSION}-arm32.apk)" \ + "- [iOS IPA](https://github.com/${{ github.repository }}/releases/download/${VERSION}/SpotiFLAC-${VERSION}-ios-unsigned.ipa)" \ + "" \ + "[View Release Notes](https://github.com/${{ github.repository }}/releases/tag/${VERSION})" \ + > /tmp/telegram_message.txt + + MESSAGE=$(cat /tmp/telegram_message.txt) + + # Send message first + curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ + -d chat_id="${TELEGRAM_CHANNEL_ID}" \ + -d text="${MESSAGE}" \ + -d parse_mode="Markdown" \ + -d disable_web_page_preview="true" + + # Upload arm64 APK to channel + if [ -f "$ARM64_APK" ]; then + echo "Uploading arm64 APK to Telegram..." + curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendDocument" \ + -F chat_id="${TELEGRAM_CHANNEL_ID}" \ + -F document=@"${ARM64_APK}" \ + -F caption="SpotiFLAC ${VERSION} - arm64 (recommended)" + fi + + # Upload arm32 APK to channel + if [ -f "$ARM32_APK" ]; then + echo "Uploading arm32 APK to Telegram..." + curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendDocument" \ + -F chat_id="${TELEGRAM_CHANNEL_ID}" \ + -F document=@"${ARM32_APK}" \ + -F caption="SpotiFLAC ${VERSION} - arm32" + fi + + echo "Telegram notification sent!" diff --git a/README.md b/README.md index 7e98684..3167ac0 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,16 @@ Download music in true lossless FLAC from Tidal, Qobuz & Amazon Music — no acc ![Android](https://img.shields.io/badge/Android-7.0%2B-3DDC84?style=for-the-badge&logo=android&logoColor=white) ![iOS](https://img.shields.io/badge/iOS-14.0%2B-000000?style=for-the-badge&logo=apple&logoColor=white) +

+ + Telegram Channel + + + + Telegram Community + +

+ ### [Download](https://github.com/zarzet/SpotiFLAC-Mobile/releases) @@ -52,6 +62,8 @@ Want to create your own extension? Check out the [Extension Development Guide](h ### [SpotiFLAC (Desktop)](https://github.com/afkarxyz/SpotiFLAC) Download music in true lossless FLAC from Tidal, Qobuz & Amazon Music for Windows, macOS & Linux +> **Note:** Currently unavailable because the GitHub account is suspended. Alternatively, use [SpotiFLAC-Next](https://github.com/spotiverse/SpotiFLAC-Next) until the original is restored. + ## FAQ **Q: Why is my download failing with "Song not found"?** @@ -72,8 +84,6 @@ A: The mobile app includes FFmpeg libraries for audio processing and format conv **Q: Is this app safe?** A: Yes, the app is open source and you can verify the code yourself. Each release is scanned with VirusTotal (see badge at top of README). -[![Ko-fi](https://img.shields.io/badge/Ko--fi-Support%20Me-FF5E5B?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/zarzet) - ## Disclaimer This project is for **educational and private use only**. The developer does not condone or encourage copyright infringement.