Automatically scrobbles tracks from Yandex Music every 24 hours using GitHub Actions.
Important
LASTFM_SESSION and YM_TOKEN are valid for 1 year. After expiration, the workflow will fail.
Setup Instructions:
-
Gather Required Tokens:
- Create a LastFM app.
- Obtain a Yandex Music token from here.
-
Repository Setup:
- Fork and clone the repository.
- Create a
.envfile from.env.sampleand fill in all fields exceptLASTFM_SESSION.
-
Session Generation:
- Obtain a token from this documentation.
- Run
TOKEN=xxx npm run sessionlocally, replacingxxxwith the token from the previous step. - Store the session key in
LASTFM_SESSIONwithin the.envfile.
-
Optional Debugging:
- Run
npm run devto scrobble your tracks from the previous day.
- Run
-
GitHub Secrets:
- Add all necessary secrets to GitHub to enable scheduled runs.