Skip to content

GetLyrices

GetLyrices #2

Workflow file for this run

name: GetLyrices
on:
workflow_dispatch:
inputs:
title:
description: '例:Pushing me away'
required: true
default: ''
author:
description: '例:Linkin Park'
required: true
default: ''
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@v4
- name: 检查环境
run: |
sudo apt update
sudo apt -y install curl
- name: 配置环境
run: |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
pip install lyricsgenius
- name: 启动get
run: |
import lyricsgenius
genius = lyricsgenius.Genius(token)
- name: 下载歌词
run: |
mkdir out
python3 -m lyricsgenius song "${{ github.event.inputs.author }}" "${{ github.event.inputs.title }}" --save
- name: 打压缩包
run: |
zip -r -9 Lyric.zip ./*
- name: 上传到库
uses: actions/upload-artifact@v4
with:
name: GetLyric
path: Lyric.zip
retention-days: 7
- name: Clean up intermediate files
run: |
rm *.zip