Skip to content
music

GitHub Action

Spotify saved songs archiver

v1.0.2 Latest version

Spotify saved songs archiver

music

Spotify saved songs archiver

Back up your saved tracks to a JSON

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Spotify saved songs archiver

uses: keller00/[email protected]

Learn more about this action in keller00/spotify-tracks-archiver-action

Choose a version

spotify-tracks-archiver-action V1.0.2

pre-commit.ci status

A GitHub action to run spotify-tracks-archiver

Use this action

name: Backup Spotify "Saved Songs" library

on:
  schedule:
        - cron: 0 4 * * 6
  workflow_dispatch:

jobs:
  pre-commit:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-python@v3
    - uses: keller00/[email protected]
      with:
        output-file: library.json
      env:
        CLIENT_ID: ${{ secrets.CLIENT_ID }}
        CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
        REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}

This does the following:

  1. Checks out your repository to commit the JSON file to.
  2. It sets up the newest availabe Python 3 (spotify_tracks_archiver requires Python 3.9, or newer).
  3. Executes spotify_tracks_archiver.

This example sets up this job to run once a week.