diff --git a/.github/workflows/fdroid.yml b/.github/workflows/fdroid.yml new file mode 100644 index 00000000..56dfe85c --- /dev/null +++ b/.github/workflows/fdroid.yml @@ -0,0 +1,66 @@ +name: Generate F-Droid repo on GitHub Pages + +on: + release: + types: [published] + workflow_dispatch: +# schedule: +# - cron: "45 2 * * *" + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + deploy: + name: "Generate repo" + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Create basic directory structure + run: mkdir -p fdroid/repo + + - name: Restore correct mtime + run: | + sudo apt install git-restore-mtime + git restore-mtime + + - name: Install F-Droid server software + run: | + sudo add-apt-repository ppa:fdroid/fdroidserver + sudo apt-get update + sudo apt-get install fdroidserver + + - name: Set up repo secrets + run: | + echo "${{ secrets.KEYSTORE_P12 }}" | base64 -d - > fdroid/keystore.p12 + echo "${{ secrets.CONFIG_YML }}" | base64 -d - > fdroid/config.yml + + - name: Run update script + run: cd fdroid-repo/fdroid && bash update.sh 2>&1 + +# - name: Setup Pages +# uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './fdroid-repo' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/fdroid-repo/fdroid/metadata/com.arn.scrobble.yml b/fdroid-repo/fdroid/metadata/com.arn.scrobble.yml new file mode 100644 index 00000000..68a64c20 --- /dev/null +++ b/fdroid-repo/fdroid/metadata/com.arn.scrobble.yml @@ -0,0 +1,41 @@ +AuthorName: 'kawaiiDango' +Categories: +- Multimedia +IssueTracker: 'https://github.com/kawaiiDango/pano-scrobbler/issues' +Name: Pano Scrobbler +SourceCode: 'https://github.com/kawaiiDango/pano-scrobbler' +Summary: 'A last.fm, ListenBrainz, libre.fm and GNU FM client for Android' +Description: | + - No ads ever + - Scrobbles to LastFM, LibreFM, GNU FM, Listenbrainz, Maloja, Pleroma or to a file + - Supports phones, TVs, tablets, and Android desktops, including Windows 11 + - Interactive notification: View song info, edit, love, cancel, or block songs directly from the + notification + - View song, album, artist, album artist, and tag details + - View scrobbles from a specific time, such as last year or last month + - Edit or delete existing scrobbles. Remembers edits + - Extract or Fix metadata such as "Remastered" with regex pattern edits + - Block artists, songs, etc., and automatically skip or mute when they play + - Check what your followed users are listening to and view their stats + - Identify and scrobble a song from the microphone + - Scrobble from the S app and Pixel Now Playing + - Import and export settings, edits, and blocklists + - View charts for a specific week, month, year, or custom range, with change indicators + - Charts are also available as a customizable home-screen widget + - Collage generator + - View scrobble count graphs for specific time periods + - Get a random songs, album, or artist from your listening history + - Search for a songs, artist, or album + - Fetch albums and album artists from LastFM, if missing, before scrobbling + - Get your top scrobble digests as a notification at the end of every week and month + - Add or remove personal tags + - Mix and match themes, supports Material You + - Broadcast Intents for automation apps like Tasker + - Remember and see apps you scrobbled from and search directly within them +AntiFeatures: + - UpstreamNonFree + - NonFreeNet +WebSite: 'https://github.com/kawaiiDango/pano-scrobbler' +Translation: https://crowdin.com/project/pscrobbler +Donate: https://ko-fi.com/kawaiiDango +License: GPL-3.0 diff --git a/fdroid-repo/fdroid/repo/.gitkeep b/fdroid-repo/fdroid/repo/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/fdroid-repo/fdroid/update.sh b/fdroid-repo/fdroid/update.sh new file mode 100644 index 00000000..eac20d61 --- /dev/null +++ b/fdroid-repo/fdroid/update.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +USER=kawaiiDango +REPO=pano-scrobbler +PACKAGE=com.arn.scrobble +# Define the URL of the GitHub repository +REPO_URL="https://api.github.com/repos/$USER/$REPO/releases" + +# Check if jq package is installed, and install it if necessary +if ! command -v jq &> /dev/null; then + sudo apt-get install -y jq +fi + +# Use curl to get the JSON response for all releases +JSON=$(curl --silent "$REPO_URL") + +# Extract the URLs of the assets named "pano-scrobbler-release.apk" and the corresponding tags +ASSET_URLS=$(echo "$JSON" | jq -r '.[] | select(.assets[0].name | endswith(".apk")) | .assets[0].browser_download_url') +TAGS=$(echo "$JSON" | jq -r '.[] | select(.assets[0].name | endswith(".apk")) | .tag_name') + +# Convert the URLs and tags to arrays +ASSET_URLS=($ASSET_URLS) +TAGS=($TAGS) + +# Download the last 5 assets +for ((i=0; i<${#ASSET_URLS[@]} && i<5; i++)); do + curl -L --create-dirs -o "repo/${REPO}-${TAGS[$i]}.apk" "${ASSET_URLS[$i]}" +done + +# download screenshots +curl -L --create-dirs -o "repo/${PACKAGE}/en-US/phoneScreenshots/1scrobbles.png" "https://i.imgur.com/pgETfhc.png" +curl -L -o "repo/${PACKAGE}/en-US/phoneScreenshots/2friends.png" "https://i.imgur.com/Q7yPi2z.png" +curl -L -o "repo/${PACKAGE}/en-US/phoneScreenshots/3charts.png" "https://i.imgur.com/MUhcyBw.png" +curl -L -o "repo/${PACKAGE}/en-US/phoneScreenshots/4random.png" "https://i.imgur.com/aikbtGR.png" + +# copy icon +cp ../../app/src/main/play/listings/en-US/icon/icon.png "repo/${PACKAGE}/en-US/icon.png" + +# Run fdroid update +fdroid update --create-metadata \ No newline at end of file