fix: 修复使用redis缓存的时候过期时间错误 #281
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build beta | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- '**.md' | |
- '.gitignore' | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
runs-on: [windows-latest, macos-latest, ubuntu-latest, ubuntu-20.04] | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v2 | |
- name: Setup Python 3.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' | |
- name: Install pyinstaller | |
run: python -m pip install pyinstaller | |
- name: Install dependencies | |
run: python -m pip install -r ./requirements.txt | |
- name: Build | |
run: python build.py build test | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-${{ matrix.runs-on }} | |
path: ./dist | |
post: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v2 | |
- name: Download Build Files | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
pattern: dist-* | |
merge-multiple: false | |
- name: Get File Address | |
run: | | |
echo "windowsFile=./dist/dist-windows-latest/lx-music-api-server_$(git rev-parse --short HEAD).exe" >> $GITHUB_ENV | |
echo "macosFile=./dist/dist-macos-latest/lx-music-api-server_$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo "linuxFile=./dist/dist-ubuntu-latest/lx-music-api-server_$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Post to Channel | |
run: | | |
echo ${{ secrets.SCRIPT_BASE64 }} | base64 -d > test.py | |
ESCAPED=`python test.py` | |
curl -s -v "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMediaGroup?chat_id=${{ secrets.TELEGRAM_ID }}&media=%5B%7B%22type%22:%22document%22,%20%22media%22:%22attach://windows%22,%22parse_mode%22:%22MarkdownV2%22,%22caption%22:${ESCAPED}%7D%5D" -F windows=@${{ env.windowsFile }} |