-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (29 loc) · 971 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 :)"