Skip to content

chore: allow isolated lyrics validation on pull request #3

chore: allow isolated lyrics validation on pull request

chore: allow isolated lyrics validation on pull request #3

name: Build lyrics reimplementation
on:
push:
branches:
- feature/lyrics-reimplementation
pull_request:
branches:
- main
permissions:
contents: write
jobs:
generate:
if: ${{ !contains(github.event.head_commit.message, '[lyrics-generated]') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install native validation tools
run: |
sudo apt-get update
sudo apt-get install -y gettext libglib2.0-bin zip
- name: Install dependencies
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Apply implementation
run: python3 scripts/apply_lyrics_reimplementation.py
- name: Update translations
run: |
pnpm run translations
python3 scripts/apply_lyrics_reimplementation.py --translations
- name: Validate
shell: bash
run: |
set -o pipefail
pnpm check 2>&1 | tee /tmp/MediaShell-lyrics-validation.txt
git diff --check
- name: Prepare clean artifacts
run: |
rm -f .github/workflows/lyrics-reimplementation.yml
rm -f scripts/apply_lyrics_reimplementation.py
git diff 367fe96f7e89ee18e94a60ab487a631561bbe94f > /tmp/MediaShell-lyrics-reimplementation.patch
zip -qr /tmp/MediaShell-lyrics-reimplementation-source.zip . \
-x '.git/*' 'node_modules/*' 'dist/*'
cat > /tmp/MediaShell-lyrics-report.md <<'EOF'
# MediaShell synchronized lyrics reimplementation
Built from the clean 2.0.0 source at commit `367fe96f7e89ee18e94a60ab487a631561bbe94f`.
The implementation uses LRCLIB, a bounded session-only cache, cancellable Soup requests, a temporary edge-to-edge lyrics mode, centered synchronized scrolling, plain-lyrics fallback, seek-on-line support, one unified unavailable state, and complete translations for every existing catalog.
No persistent lyrics cache, cache preference, additional validation script, or private GNOME Shell API was added.
EOF
- name: Commit generated source
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add -A
git commit -m '[lyrics-generated] feat(popup): add synchronized lyrics'
git push origin HEAD:feature/lyrics-reimplementation
- uses: actions/upload-artifact@v4
with:
name: MediaShell-lyrics-reimplementation
path: |
/tmp/MediaShell-lyrics-reimplementation-source.zip
/tmp/MediaShell-lyrics-reimplementation.patch
/tmp/MediaShell-lyrics-report.md
/tmp/MediaShell-lyrics-validation.txt
if-no-files-found: error