Update SteamVideoClip.py #21
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: Build and Auto Release EXE | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt pyinstaller | |
| - name: Clean build folders | |
| run: | | |
| Remove-Item -Recurse -Force build, dist -ErrorAction SilentlyContinue | |
| Remove-Item -Force SteamVideoClip.spec -ErrorAction SilentlyContinue | |
| - name: Build EXE | |
| run: pyinstaller --onefile --windowed --icon=program_icon.ico SteamVideoClip.py --hidden-import=moviepy.editor --hidden-import=moviepy.audio --hidden-import=moviepy.video --hidden-import=PIL --hidden-import=PyQt5.QtCore --hidden-import=PyQt5.QtGui --hidden-import=PyQt5.QtWidgets --collect-all moviepy --collect-all imageio --collect-submodules moviepy --collect-submodules moviepy.editor --additional-hooks-dir=. | |
| - name: Determine next version | |
| id: tag | |
| shell: bash | |
| run: | | |
| git fetch --tags | |
| latest_tag=$(git tag --list 'v*' | sort -V | tail -n1) | |
| if [ -z "$latest_tag" ]; then | |
| next_tag="v1.0.0" | |
| else | |
| IFS='.' read -r major minor patch <<< "${latest_tag#v}" | |
| patch=$((patch+1)) | |
| next_tag="v$major.$minor.$patch" | |
| fi | |
| echo "next_tag=$next_tag" >> $GITHUB_ENV | |
| - name: Create Tag | |
| shell: bash | |
| run: | | |
| git config user.name "${GITHUB_ACTOR}" | |
| git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
| git tag ${{ env.next_tag }} | |
| git push origin ${{ env.next_tag }} | |
| - name: Create Release and Upload EXE | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ env.next_tag }} | |
| files: dist/SteamVideoClip.exe | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |