Skip to content

Commit

Permalink
Update archive-discover-weekly.yml to use new scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jerboa88 committed Nov 13, 2024
1 parent debf670 commit c0cc20a
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/archive-discover-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,37 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
cache: 'pip'

- name: Install Python deps
run: pip install -r requirements.txt

- name: Run playlist archiver script
- name: Get playlist ID
shell: bash
env:
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }}
SPOTIFY_ACCESS_TOKEN: ${{ secrets.SPOTIFY_ACCESS_TOKEN }}
SPOTIFY_REFRESH_TOKEN: ${{ secrets.SPOTIFY_REFRESH_TOKEN }}
SPOTIFY_PLAYLIST_NAMES: 'Discover Weekly' 'Découvertes de la semaine' 'Découvertes hebdomadaires' 'Descubrimiento semanal' 'Descobertas da Semana' 'Descubrimiento semanal' 'اكتشف هذا الأسبوع' 'Открытиях недели'
run: >
python playlist-archiver-for-spotify.py
echo "SPOTIFY_PLAYLIST_ID=$(
python get-playlist-id.py
"$SPOTIFY_CLIENT_ID" "$SPOTIFY_CLIENT_SECRET"
"$SPOTIFY_ACCESS_TOKEN" "$SPOTIFY_REFRESH_TOKEN"
${SPOTIFY_PLAYLIST_NAMES}
)" >> $GITHUB_ENV
- name: Copy playlist
shell: bash
env:
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }}
SPOTIFY_ACCESS_TOKEN: ${{ secrets.SPOTIFY_ACCESS_TOKEN }}
SPOTIFY_REFRESH_TOKEN: ${{ secrets.SPOTIFY_REFRESH_TOKEN }}
run: >
python copy-playlist.py
"$SPOTIFY_CLIENT_ID" "$SPOTIFY_CLIENT_SECRET"
"$SPOTIFY_ACCESS_TOKEN" "$SPOTIFY_REFRESH_TOKEN"
"Discover Weekly" "DW - %b %e"
"$SPOTIFY_PLAYLIST_ID" "DW - %b %e"

0 comments on commit c0cc20a

Please sign in to comment.