build-windows-package.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. ls -la
  30. huggingface-cli download fishaudio/fish-speech-1 fish-speech-v1.0.zip \
  31. --local-dir ./ --local-dir-use-symlinks False
  32. unzip -q fish-speech-v1.0.zip -d fish-speech-zip
  33. rm fish-speech-v1.0.zip
  34. mv fish-speech-zip/fish-speech/fishenv fish-speech-zip/fish-speech/ffmpeg.exe \
  35. fish-speech-zip/fish-speech/checkpoints fish-speech-zip/fish-speech/.cache ./fish-speech
  36. rm -rf fish-speech-zip
  37. rm ./fish-speech/checkpoints/text2semantic-sft-large-v1-4k.pth
  38. rm ./fish-speech/checkpoints/text2semantic-pretrain-medium-2k-v1.pth
  39. huggingface-cli download fishaudio/fish-speech-1 ffprobe.exe \
  40. --local-dir ./fish-speech --local-dir-use-symlinks False
  41. huggingface-cli download fishaudio/fish-speech-1 text2semantic-sft-large-v1.1-4k.pth \
  42. --local-dir ./fish-speech/checkpoints --local-dir-use-symlinks False
  43. huggingface-cli download fishaudio/fish-speech-1 text2semantic-sft-medium-v1.1-4k.pth \
  44. --local-dir ./fish-speech/checkpoints --local-dir-use-symlinks False
  45. huggingface-cli download fishaudio/fish-speech-1 vits_decoder_v1.1.ckpt \
  46. --local-dir ./fish-speech/checkpoints --local-dir-use-symlinks False
  47. - uses: actions/upload-artifact@v4
  48. with:
  49. name: fish-speech-main-${{ github.run_id }}
  50. path: ./fish-speech
  51. - name: Upload to Hugging Face
  52. env:
  53. HF_TOKEN: ${{ secrets.HF_TOKEN }}
  54. run: |
  55. if [ "${{ github.actor }}" = "AnyaCoder" ]; then
  56. echo "Author is AnyaCoder. Performing the zipping && upload."
  57. zip -qr fish-speech-main-${{ github.run_id }}.zip ./fish-speech
  58. huggingface-cli upload SpicyqSama007/fish-speech-packed ./fish-speech-main-${{ github.run_id }}.zip fish-speech-main-${{ github.run_id }}.zip
  59. else
  60. echo "Author is not AnyaCoder. No upload performed."
  61. fi