Skip to content

Create Randomized Spotify Playlist #30

Create Randomized Spotify Playlist

Create Randomized Spotify Playlist #30

Workflow file for this run

name: Create Randomized Spotify Playlist
on:
schedule:
- cron: '0 0 * * MON' # Runs every Monday
workflow_dispatch: # Allows manual trigger
jobs:
build:
runs-on: ubuntu-latest
env: # Setting environment variables using secrets
SPOTIPY_CLIENT_ID: ${{ secrets.SPOTIPY_CLIENT_ID }}
SPOTIPY_CLIENT_SECRET: ${{ secrets.SPOTIPY_CLIENT_SECRET }}
SPOTIPY_REFRESH_TOKEN: ${{ secrets.SPOTIPY_REFRESH_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: pip install spotipy pandas
- name: Run script
run: python script.py
- name: Save CSV as artifact
uses: actions/upload-artifact@v3
with:
name: selected_tracks.csv
path: ./selected_tracks.csv
- name: Print it worked
run: echo "It's working! Enjoy :)"