Dough Git

commit

Delete .github directory

commit
d84ca83eec67027e96c8faaa77e0c1b7909bcf1e
author
Clove Twilight <[email protected]>
date
2026-11-24 18:20

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 7c04cc6..0000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-version: 2
-
-# Keeps dependencies patched across the whole monorepo. Updates are grouped by
-# semver bump so you get a few tidy PRs a week instead of a flood of individual
-# ones. Weekly cadence; bump the interval to `daily` if you want them sooner.
-updates:
-  # JavaScript/TypeScript deps — root plus every workspace package (web/* and
-  # apps/*). Uses the native `bun` ecosystem (GA since Feb 2025) so bun.lock is
-  # updated too.
-  - package-ecosystem: bun
-    directories:
-      - "/"
-      - "/web/*"
-      - "/apps/*"
-    schedule:
-      interval: weekly
-    open-pull-requests-limit: 10
-    groups:
-      bun-minor-patch:
-        update-types: ["minor", "patch"]
-
-  # The actions pinned in .github/workflows (checkout, docker/*, setup-*, etc.).
-  - package-ecosystem: github-actions
-    directory: "/"
-    schedule:
-      interval: weekly
-    groups:
-      github-actions:
-        update-types: ["minor", "patch"]
-
-  # The base image in the root Dockerfile (oven/bun).
-  - package-ecosystem: docker
-    directory: "/"
-    schedule:
-      interval: weekly
diff --git a/.github/workflows/codeberg.yml b/.github/workflows/codeberg.yml
deleted file mode 100644
index 27b579e..0000000
--- a/.github/workflows/codeberg.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-name: Codeberg
-
-on:
-  push:
-
-jobs:
-  mirror:
-    runs-on: ubuntu-latest
-
-    permissions:
-      contents: read
-
-    concurrency:
-      group: mirror-${{ github.repository }}
-      cancel-in-progress: false
-
-    env:
-      CODEBERG_HOST: codeberg.org
-      CODEBERG_USERNAME: ${{ secrets.CODEBERG_USERNAME }}
-      CODEBERG_REPO: ${{ secrets.CODEBERG_REPO }}
-      CODEBERG_TOKEN: ${{ secrets.CODEBERG_TOKEN }}
-
-    steps:
-      - name: Clone every ref
-        env:
-          SOURCE_TOKEN: ${{ github.token }}
-          SERVER_URL: ${{ github.server_url }}
-        run: |
-          set -euo pipefail
-
-          sourceHost="${SERVER_URL#https://}"
-
-          git clone --mirror \
-            "https://x-access-token:${SOURCE_TOKEN}@${sourceHost}/${GITHUB_REPOSITORY}.git" \
-            source.git
-
-      - name: Drop pull-request refs
-        working-directory: source.git
-        run: |
-          set -euo pipefail
-
-          git for-each-ref --format='%(refname)' 'refs/pull/*' \
-            | while read -r ref; do
-                git update-ref -d "$ref"
-              done
-
-      - name: Push mirror
-        working-directory: source.git
-        run: |
-          set -euo pipefail
-
-          if [ -z "$CODEBERG_USERNAME" ]; then
-            echo "CODEBERG_USERNAME is not set" >&2
-            exit 1
-          fi
-
-          if [ -z "$CODEBERG_REPO" ]; then
-            echo "CODEBERG_REPO is not set" >&2
-            exit 1
-          fi
-
-          targetUrl="https://${CODEBERG_HOST}/${CODEBERG_USERNAME}/${CODEBERG_REPO}.git"
-
-          echo "Mirroring ${GITHUB_REPOSITORY} -> ${targetUrl}"
-
-          git remote add mirror "$targetUrl"
-
-          # Credentials go through a helper so the token never lands in .git/config
-          git -c credential.helper= \
-              -c "credential.helper=!f() { echo username=\"\$CODEBERG_USERNAME\"; echo password=\"\$CODEBERG_TOKEN\"; }; f" \
-              push --mirror mirror
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
deleted file mode 100644
index 2759d73..0000000
--- a/.github/workflows/docker.yml
+++ /dev/null
@@ -1,61 +0,0 @@
-name: docker
-
-# Builds the server image (root Dockerfile) and pushes it to Docker Hub.
-#   - push to main        -> tags `latest` and `main-<short-sha>`
-#   - push a v* git tag   -> semver tags, e.g. `1.2.3` and `1.2`
-#   - manual run          -> same as a main push
-#
-# Requires two repo secrets: DOCKERHUB_USERNAME and DOCKERHUB_TOKEN (a Docker
-# Hub *access token*, not your password — Account Settings > Security).
-on:
-  workflow_dispatch:
-
-env:
-  # The Docker Hub repository name (the part after your username). Change this
-  # if you want the image published under a different name.
-  IMAGE_NAME: doughmination-music
-
-jobs:
-  build-push:
-    runs-on: ubuntu-latest
-
-    steps:
-      - uses: actions/checkout@v7
-
-      - uses: docker/setup-buildx-action@v4
-
-      - name: log in to Docker Hub
-        uses: docker/[email protected]
-        with:
-          username: ${{ secrets.DOCKERHUB_USERNAME }}
-          password: ${{ secrets.DOCKERHUB_TOKEN }}
-
-      # Derives the image name + the set of tags to push from the event that
-      # triggered the run (branch push vs version tag).
-      - name: derive tags
-        id: meta
-        uses: docker/metadata-action@v6
-        with:
-          images: docker.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
-          tags: |
-            type=raw,value=latest,enable={{is_default_branch}}
-            type=sha,prefix=main-,enable={{is_default_branch}}
-            type=semver,pattern={{version}}
-            type=semver,pattern={{major}}.{{minor}}
-
-      - name: build and push
-        uses: docker/build-push-action@v7
-        with:
-          context: .
-          file: ./Dockerfile
-          push: true
-          # amd64 covers most self-hosted servers. To also publish arm64 (e.g.
-          # for a Pi / ARM VPS), add `linux/arm64` here and a
-          # `docker/setup-qemu-action@v3` step above — note the arm64 leg builds
-          # under emulation, so it's noticeably slower.
-          platforms: linux/amd64
-          tags: ${{ steps.meta.outputs.tags }}
-          labels: ${{ steps.meta.outputs.labels }}
-          # Reuse layers between runs via the GitHub Actions cache.
-          cache-from: type=gha
-          cache-to: type=gha,mode=max
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 9164871..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,361 +0,0 @@
-name: release
-
-# Builds every platform for one tag and publishes a single GitHub Release:
-#
-#   create-release  makes the draft
-#   build           Electron desktop app for macOS / Linux / Windows via
-#                   electron-builder (apps/desktop — a thin shell over the live
-#                   site plus Discord Rich Presence over IPC; no Rust, no
-#                   proprietary SDK)
-#   android         the SIGNED native Android APK (apps/android — a WebView
-#                   shell with a native Media3 playback service for
-#                   background/locked playback), attached last, then the
-#                   release is flipped to published + "latest"
-#   aur             repackages the published Linux AppImage for the AUR
-#
-# The release only goes live once every artifact is present.
-#
-# Migrated off Tauri/Rust on 2026-08-30: gone are the Discord Social SDK fetch,
-# the Rust toolchain, the Linux WebKitGTK build deps, and the whole "unbundle
-# the GTK stack from the AppImage" dance — Electron ships its own Chromium.
-#
-# THIS FILE IS MADE BY CLAUDE, SO IF SHIT BREAKS, I'M SORRY!
-on:
-  workflow_dispatch:
-    inputs:
-      version:
-        description: "Release tag to create, e.g. v1.0.0"
-        required: true
-        type: string
-      siteUrl:
-        description: "Override the site the Android WebView loads (optional)"
-        required: false
-        type: string
-      codename:
-        description: 'Optional release codename, e.g. Aurora (title only)'
-        required: false
-        type: string
-
-jobs:
-  # Create the draft release up front so the matrix jobs (and android/aur) all
-  # have something to attach to without racing each other on creation.
-  create-release:
-    permissions:
-      contents: write
-    runs-on: ubuntu-latest
-    steps:
-      - uses: softprops/action-gh-release@v2
-        with:
-          tag_name: ${{ inputs.version || github.ref_name }}
-          name: >-
-            ${{ inputs.codename
-            && format('Doughmination Music {0} "{1}"', inputs.version || github.ref_name, inputs.codename)
-            || format('Doughmination Music {0}', inputs.version || github.ref_name) }}
-          draft: true
-          prerelease: false
-
-  build:
-    needs: create-release
-    permissions:
-      contents: write
-
-    strategy:
-      fail-fast: false
-      matrix:
-        include:
-          - platform: macos-latest
-            electronArgs: "--universal"
-          - platform: ubuntu-latest
-            electronArgs: ""
-          - platform: windows-latest
-            electronArgs: ""
-
-    runs-on: ${{ matrix.platform }}
-
-    steps:
-      - uses: actions/checkout@v7
-
-      - uses: oven-sh/setup-bun@v2
-
-      - run: bun install
-
-      # electron-updater compares the running app's version against the one in
-      # the published latest*.yml, so the packaged build has to carry the tag's
-      # version (the checked-in package.json is only ever a floor). Edit the
-      # field directly — `npm version` chokes on this repo's `workspace:*`
-      # deps, and npm isn't the package manager here anyway.
-      - name: stamp desktop version
-        working-directory: apps/desktop
-        shell: bash
-        run: |
-          node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));p.version=process.env.VERSION.replace(/^v/,'');fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n')"
-          node -e "console.log('desktop version =>',require('./package.json').version)"
-        env:
-          VERSION: ${{ inputs.version || github.ref_name }}
-
-      # Compiles apps/desktop/src -> dist, then electron-builder packages it.
-      # electron-builder reads apps/desktop/package.json `dependencies` to
-      # bundle @xhayper/discord-rpc. Artifact names are pinned (version-less)
-      # in apps/desktop/electron-builder.yml so no rename step is needed.
-      - name: build desktop app
-        working-directory: apps/desktop
-        shell: bash
-        run: bun run build:main && bunx electron-builder ${{ matrix.electronArgs }} --publish never
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-      - name: attach artifacts to the draft release
-        uses: softprops/action-gh-release@v2
-        with:
-          tag_name: ${{ inputs.version || github.ref_name }}
-          draft: true
-          files: |
-            apps/desktop/release/*.dmg
-            apps/desktop/release/*.zip
-            apps/desktop/release/*.exe
-            apps/desktop/release/*.AppImage
-            apps/desktop/release/*.deb
-            apps/desktop/release/*.blockmap
-            apps/desktop/release/latest*.yml
-
-  android:
-    # Builds and publishes the SIGNED native Android APK (apps/android): a
-    # WebView shell around the site plus a native Media3 playback service
-    # (background/locked playback + a media notification). Runs after the
-    # desktop matrix so the draft release already exists to attach the APK to.
-    # If any desktop build fails, this is skipped and the release stays a
-    # draft — we don't publish a half-built release.
-    needs: build
-    runs-on: ubuntu-latest
-
-    # Needs write access to upload the APK and flip the release to published.
-    permissions:
-      contents: write
-
-    steps:
-      - uses: actions/checkout@v7
-
-      # Gradle can't run on JDK 25 (the class-file-version error); 17 is the
-      # Android reference JDK.
-      - uses: actions/setup-java@v5
-        with:
-          distribution: temurin
-          java-version: "17"
-
-      # Provides sdkmanager and accepts the SDK licenses.
-      - uses: android-actions/setup-android@v4
-
-      # Make sure the exact platform + build-tools the module targets are present.
-      - name: install SDK packages
-        run: sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
-
-      - uses: gradle/actions/setup-gradle@v6
-        with:
-          gradle-version: "8.9"
-
-      # Write keystore.properties + decode the keystore from repo secrets so the
-      # release build signs automatically.
-      - name: set up signing
-        working-directory: apps/android
-        run: |
-          echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" > keystore.properties
-          echo "password=${{ secrets.ANDROID_KEY_PASSWORD }}" >> keystore.properties
-          base64 -d <<< "${{ secrets.ANDROID_KEY_BASE64 }}" > "$RUNNER_TEMP/keystore.jks"
-          echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties
-
-      - name: build signed APK
-        working-directory: apps/android
-        run: |
-          ARGS="-PversionName=${VERSION#*v} -PversionCode=${{ github.run_number }}"
-          if [ -n "${SITE_URL}" ]; then ARGS="$ARGS -PsiteUrl=${SITE_URL}"; fi
-          gradle assembleRelease --no-daemon $ARGS
-        env:
-          VERSION: ${{ inputs.version || github.ref_name }}
-          SITE_URL: ${{ inputs.siteUrl }}
-
-      # Attach the signed APK to the draft release, then publish it as the
-      # latest release. Fails loudly if only an -unsigned APK exists (which
-      # would mean signing silently didn't apply).
-      - name: upload APK and publish release
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          TAG: ${{ inputs.version || github.ref_name }}
-        run: |
-          APK=$(find apps/android/app/build/outputs/apk/release \
-            -name "*-release.apk" ! -name "*unsigned*" | head -1)
-          if [ -z "$APK" ]; then
-            echo "::error::No signed release APK found — did the ANDROID_KEY_* secrets apply?"
-            find apps/android/app/build/outputs/apk -name "*.apk" || true
-            exit 1
-          fi
-          echo "Signed APK: $APK"
-          # Version-less, like the desktop artifacts — see the "republish
-          # artifacts under version-less names" step in the build job.
-          cp "$APK" "doughmination-music-android.apk"
-          gh release upload "$TAG" "doughmination-music-android.apk" --clobber
-          gh release edit "$TAG" --draft=false --latest
-
-  aur:
-    # Publishes the Arch package (doughmination-music) to the AUR from
-    # packaging/aur/PKGBUILD.
-    #
-    # Runs after `android`, not after `build`, because `android` is the job
-    # that flips the release from draft to published — and the PKGBUILD's
-    # source= URL points at the release's public download endpoint, which
-    # returns 404 for a draft. Nothing else here depends on Android.
-    #
-    # Skips itself (rather than failing) when AUR_SSH_PRIVATE_KEY isn't
-    # configured, so forks and key-less runs still get a normal release.
-    needs: android
-    runs-on: ubuntu-latest
-    # base-devel gives us makepkg + fakeroot; the alternative is reimplementing
-    # .SRCINFO generation by hand on Ubuntu, which is exactly the sort of thing
-    # that silently drifts from what the AUR expects.
-    container: archlinux:base-devel
-
-    steps:
-      # Before checkout: actions/checkout falls back to a slow, shallow REST
-      # download when git is missing from the container.
-      - name: install tooling
-        run: |
-          pacman -Syu --noconfirm --needed \
-            git openssh pacman-contrib namcap github-cli
-
-      - uses: actions/checkout@v7
-
-      - name: build and push the AUR package
-        env:
-          AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          TAG: ${{ inputs.version || github.ref_name }}
-          REPO: ${{ github.repository }}
-        run: |
-          set -eu
-
-          if [ -z "${AUR_SSH_PRIVATE_KEY:-}" ]; then
-            echo "::notice::AUR_SSH_PRIVATE_KEY is not set — skipping AUR publish"
-            exit 0
-          fi
-
-          PKGVER="${TAG#v}"
-
-          # The AppImage name is pinned version-less in
-          # apps/desktop/electron-builder.yml, but ask the release what it's
-          # actually called rather than hardcoding it here too.
-          APPIMAGE_NAME=$(gh release view "$TAG" --repo "$REPO" \
-            --json assets --jq '.assets[].name | select(endswith(".AppImage"))' \
-            | head -1)
-          if [ -z "$APPIMAGE_NAME" ]; then
-            echo "::error::No .AppImage asset on release $TAG"
-            exit 1
-          fi
-          echo "Packaging $APPIMAGE_NAME as $PKGVER"
-
-          # makepkg refuses to run as root, and this container is root.
-          useradd -m builder
-          WORK=/tmp/aurbuild
-          install -d -o builder -g builder "$WORK"
-
-          cp packaging/aur/PKGBUILD "$WORK/PKGBUILD"
-          sed -i \
-            -e "s|^pkgver=.*|pkgver=$PKGVER|" \
-            -e "s|^pkgrel=.*|pkgrel=1|" \
-            -e "s|^_appimagefile=.*|_appimagefile=\"$APPIMAGE_NAME\"|" \
-            "$WORK/PKGBUILD"
-          chown builder:builder "$WORK/PKGBUILD"
-
-          # updpkgsums replaces the SKIP placeholders with real hashes of what
-          # we just published; the test build is what catches a PKGBUILD that
-          # no longer matches the artifact's layout BEFORE it reaches the AUR.
-          runuser -l builder -c "cd $WORK && updpkgsums"
-          runuser -l builder -c "cd $WORK && makepkg --printsrcinfo > .SRCINFO"
-          runuser -l builder -c "cd $WORK && makepkg --nodeps --noconfirm"
-          runuser -l builder -c "cd $WORK && namcap ./*.pkg.tar.zst" || \
-            echo "::warning::namcap reported issues (advisory only)"
-
-          PKGNAME=$(bash -c "source $WORK/PKGBUILD >/dev/null 2>&1; echo \$pkgname")
-
-          # Absolute paths, deliberately NOT ~/.ssh: this is a container job,
-          # where Actions sets HOME=/github/home but OpenSSH resolves `~`
-          # through getpwuid() to /root. The two disagree, so ssh-keyscan
-          # wrote a known_hosts ssh never read and `-i ~/.ssh/aur` named a
-          # file that did not exist — which surfaced, confusingly, as "Host
-          # key verification failed" on the clone below.
-          SSH_DIR=/tmp/aur-ssh
-          install -dm700 "$SSH_DIR"
-          printf '%s\n' "$AUR_SSH_PRIVATE_KEY" > "$SSH_DIR/id"
-          chmod 600 "$SSH_DIR/id"
-
-          # Pin the host key instead of trusting whatever keyscan happens to
-          # meet; this is the fingerprint the AUR publishes.
-          ssh-keyscan -t ed25519 aur.archlinux.org > "$SSH_DIR/known_hosts"
-          _fp=$(ssh-keygen -lf "$SSH_DIR/known_hosts" | awk 'NR==1{print $2}')
-          _expected='SHA256:RFzBCUItH9LZS0cKB5UE6ceAYhBD5C8GeOBip8Z11+4'
-          if [ "$_fp" != "$_expected" ]; then
-            echo "::error::Unexpected host key for aur.archlinux.org: $_fp"
-            exit 1
-          fi
-
-          _ssh="ssh -i $SSH_DIR/id -o IdentitiesOnly=yes -o UserKnownHostsFile=$SSH_DIR/known_hosts"
-          export GIT_SSH_COMMAND="$_ssh"
-          git config --global user.name "Doughmination Release Bot"
-          git config --global user.email "[email protected]"
-
-          # Prove the key authenticates BEFORE reading anything into a clone
-          # failure. Without this, a bad secret or unreachable host looks
-          # exactly like "package doesn't exist yet" and gets quietly
-          # promoted into a first-import attempt that then fails on push.
-          if ! $_ssh [email protected] help >/dev/null 2>&1; then
-            echo "::error::Cannot authenticate to the AUR. Is AUR_SSH_PRIVATE_KEY the private half of the key registered on the AUR account?"
-            exit 1
-          fi
-
-          # With auth proven, a failed clone means only that the package does
-          # not exist yet — an AUR package is created by its first push, so
-          # there is nothing to register beforehand.
-          if ! git clone "ssh://[email protected]/$PKGNAME.git" /tmp/aurrepo; then
-            echo "::notice::No AUR repo yet for $PKGNAME — creating it with this push"
-            git init -b master /tmp/aurrepo
-            git -C /tmp/aurrepo remote add origin "ssh://[email protected]/$PKGNAME.git"
-          fi
-
-          # The AUR clone is the only thing that knows whether this pkgver has
-          # already been published. Re-running the release for a tag rebuilds
-          # the AppImage, and Electron builds are not reproducible — the same
-          # 3.1.0 comes back with a different sha256. Pushing that under an
-          # unchanged pkgver-pkgrel is invisible to AUR helpers: yay sees the
-          # cached build files as up to date, skips re-fetching the PKGBUILD
-          # and then fails its validity check against the old sums. Bumping
-          # pkgrel is the only signal that makes them refresh.
-          if [ -f /tmp/aurrepo/.SRCINFO ]; then
-            _oldver=$(awk -F' = ' '/^[[:space:]]*pkgver = /{print $2; exit}' /tmp/aurrepo/.SRCINFO)
-            _oldrel=$(awk -F' = ' '/^[[:space:]]*pkgrel = /{print $2; exit}' /tmp/aurrepo/.SRCINFO)
-          else
-            _oldver=""; _oldrel=""
-          fi
-
-          if [ "$_oldver" = "$PKGVER" ] && [ -n "$_oldrel" ]; then
-            # Compare at the published pkgrel so an unchanged re-run is a
-            # no-op rather than an endless pkgrel ratchet.
-            sed "s|^pkgrel=.*|pkgrel=$_oldrel|" "$WORK/PKGBUILD" > "$WORK/PKGBUILD.cmp"
-            if cmp -s "$WORK/PKGBUILD.cmp" /tmp/aurrepo/PKGBUILD; then
-              echo "::notice::AUR package already up to date for $PKGVER-$_oldrel"
-              exit 0
-            fi
-            _newrel=$((_oldrel + 1))
-            echo "::notice::$PKGVER is already published as -$_oldrel and the package changed (rebuilt artifact?) — publishing -$_newrel"
-            sed -i "s|^pkgrel=.*|pkgrel=$_newrel|" "$WORK/PKGBUILD"
-            chown builder:builder "$WORK/PKGBUILD"
-            runuser -l builder -c "cd $WORK && makepkg --printsrcinfo > .SRCINFO"
-          fi
-
-          cp "$WORK/PKGBUILD" "$WORK/.SRCINFO" /tmp/aurrepo/
-          git -C /tmp/aurrepo add PKGBUILD .SRCINFO
-          if git -C /tmp/aurrepo diff --cached --quiet; then
-            echo "::notice::AUR package already up to date for $PKGVER"
-            exit 0
-          fi
-          PKGREL=$(bash -c "source $WORK/PKGBUILD >/dev/null 2>&1; echo \$pkgrel")
-          git -C /tmp/aurrepo commit -m "Update to $PKGVER-$PKGREL"
-          git -C /tmp/aurrepo push origin HEAD:master
-          echo "Published $PKGNAME $PKGVER-$PKGREL to the AUR"