Repository navigation
Update build.yml #36
This file contains hidden or 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: Create new release | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| tags: | |
| - "!**" | |
| jobs: | |
| build: | |
| name: Build | |
| #runs-on: ubuntu-latest | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install fuse and libfuse2 | |
| run: sudo apt install fuse libfuse2 | |
| - name: Get appimagetool | |
| run: | | |
| set -x | |
| #wget https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage | |
| wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage | |
| chmod +x appimagetool-x86_64.AppImage | |
| pwd; ls -lah | |
| - name: Get Pyhton AppImage | |
| run: | | |
| set -x | |
| #wget https://github.com/niess/python-appimage/releases/download/python3.11/python3.11.4-cp311-cp311-manylinux_2_28_x86_64.AppImage | |
| wget https://github.com/ryuuzaki42/Python_to_make_AppImage/releases/download/06/python3.13.3-cp313-cp313-manylinux2014_x86_64.AppImage | |
| fileName=$(ls python3*.AppImage) | |
| chmod +x "$fileName" | |
| ./"$fileName" --appimage-extract | |
| pwd; ls -lah | |
| - name: Install Autosubsync and update pip | |
| run: | | |
| set -x | |
| cd squashfs-root/opt/python3*/bin/ | |
| pwd; ls -lah | |
| ./pip3.* install autosubsync | |
| ./python3.* -m pip install --upgrade pip | |
| - name: Make AppImage | |
| run: | | |
| set -x | |
| version="1.0.1" | |
| cd squashfs-root/ | |
| pwd; ls -lah | |
| #rm -v python* .DirIcon AppRun | |
| rm -v .DirIcon AppRun | |
| #find . | grep ".png" | |
| #find . | grep ".svg" | |
| mv python.png Autosubsync.png | |
| #find . | grep ".desktop" | |
| rm python*.desktop | |
| echo '[Desktop Entry] | |
| Type=Application | |
| Name=Autosubsync | |
| Exec=Autosubsync | |
| Comment=Automatically synchronize subtitles with audio using machine learning | |
| Icon=Autosubsync | |
| Categories=Utility | |
| Terminal=true' > Autosubsync.desktop | |
| chmod +x Autosubsync.desktop | |
| cat Autosubsync.desktop | |
| sed -i "s/Name=Autosubsync.*/Name=Autosubsync-$version/" Autosubsync.desktop | |
| cat Autosubsync.desktop | |
| pwd; ls -lah | |
| cd ../ | |
| mv AppRun squashfs-root/ | |
| mv README.md squashfs-root/ | |
| ls -lah squashfs-root/ | |
| ARCH=x86_64 ./appimagetool-x86_64.AppImage squashfs-root/ | |
| pwd; ls -lah | |
| fileName=$(ls Autosubsync*.AppImage) | |
| echo "fileName: $fileName" | |
| fileNameNew=$(echo "$fileName" | sed 's/.AppImage//') | |
| mv "$fileName" "${fileNameNew}-1_JB.AppImage" | |
| md5sum "${fileNameNew}-1_JB.AppImage" > "${fileNameNew}-1_JB.AppImage.md5" | |
| pwd; ls -lah | |
| # https://github.com/marketplace/actions/upload-to-github-release | |
| - uses: xresloader/upload-to-github-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| file: "Autosubsync*.AppImage; Autosubsync*.md5" | |
| #overwrite: true | |
| verbose: true | |
| draft: false | |
| default_release_name: "Autosubsync v in AppImage" |