build-windows-package.yml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. name: build-windows-package
  2. on:
  3. push:
  4. branches:
  5. - main
  6. jobs:
  7. deploy:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Remove unnecessary files
  11. run: |
  12. sudo rm -rf /usr/share/dotnet
  13. sudo rm -rf /opt/ghc
  14. sudo rm -rf /usr/local/lib/android
  15. sudo rm -rf "/usr/local/share/boost"
  16. sudo rm -rf "$AGENT_TOOLSDIRECTORY"
  17. - uses: actions/setup-python@v5
  18. with:
  19. python-version: 3.12
  20. - uses: actions/checkout@v4
  21. with:
  22. path: ./fish-speech
  23. - name: Setup Hugging Face CLI
  24. run: pip3 install huggingface-hub
  25. - name: Download Windows Binaries
  26. env:
  27. HF_TOKEN: ${{ secrets.HF_TOKEN }}
  28. run: |
  29. if [[ "${{ github.actor }}" = "Leng Yue" ]] || [[ "${{ github.actor }}" = "AnyaCoder" ]] || [[ "${{ github.actor }}" = "pre-commit-ci[bot]" ]]; then
  30. ls -la
  31. huggingface-cli download fishaudio/fish-speech-1 fish-speech-v1.1.zip \
  32. --local-dir ./ --local-dir-use-symlinks False
  33. unzip -q fish-speech-v1.1.zip -d fish-speech-zip
  34. rm fish-speech-v1.1.zip
  35. mv fish-speech-zip/fish-speech/fishenv fish-speech-zip/fish-speech/ffmpeg.exe \
  36. fish-speech-zip/fish-speech/checkpoints fish-speech-zip/fish-speech/ffprobe.exe ./fish-speech
  37. rm -rf fish-speech-zip
  38. huggingface-cli download fishaudio/fish-speech-1 text2semantic-sft-large-v1.1-4k.pth \
  39. --local-dir ./fish-speech/checkpoints --local-dir-use-symlinks False
  40. huggingface-cli download fishaudio/fish-speech-1 text2semantic-sft-medium-v1.1-4k.pth \
  41. --local-dir ./fish-speech/checkpoints --local-dir-use-symlinks False
  42. huggingface-cli download fishaudio/fish-speech-1 firefly-gan-base-generator.ckpt \
  43. --local-dir ./fish-speech/checkpoints --local-dir-use-symlinks False
  44. huggingface-cli download fishaudio/fish-speech-1 vits_decoder_v1.1.ckpt \
  45. --local-dir ./fish-speech/checkpoints --local-dir-use-symlinks False
  46. huggingface-cli download fishaudio/fish-speech-1 vq-gan-group-fsq-2x1024.pth \
  47. --local-dir ./fish-speech/checkpoints --local-dir-use-symlinks False
  48. else
  49. echo "Author is not Leng Yue nor AnyaCoder. No upload performed."
  50. fi
  51. - uses: actions/upload-artifact@v4
  52. with:
  53. name: fish-speech-main-${{ github.run_id }}
  54. path: ./fish-speech
  55. - name: Upload to Hugging Face
  56. env:
  57. HF_TOKEN: ${{ secrets.HF_TOKEN }}
  58. run: |
  59. if [ "${{ github.actor }}" = "AnyaCoder" ]; then
  60. echo "Author is AnyaCoder. Performing the zipping && upload."
  61. zip -qr fish-speech-main-${{ github.run_id }}.zip ./fish-speech
  62. huggingface-cli upload SpicyqSama007/fish-speech-packed ./fish-speech-main-${{ github.run_id }}.zip fish-speech-main-${{ github.run_id }}.zip
  63. else
  64. echo "Author is not AnyaCoder. No upload performed."
  65. fi