fix: remove license classifier conflicting with PEP 639 license expre… #3
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| pypi: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Build package | |
| run: | | |
| pip install build | |
| python -m build | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| binary: | |
| name: Build macOS binary | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| pip install -e ".[vision]" | |
| pip install pyinstaller | |
| - name: Build binary | |
| run: | | |
| pyinstaller \ | |
| --name video2ai \ | |
| --onefile \ | |
| --hidden-import video2ai \ | |
| --hidden-import video2ai.cli \ | |
| --hidden-import video2ai.web \ | |
| --hidden-import video2ai.frames \ | |
| --hidden-import video2ai.probe \ | |
| --hidden-import video2ai.transcribe \ | |
| --hidden-import video2ai.vision \ | |
| --hidden-import video2ai.clip_match \ | |
| --hidden-import video2ai.contact_sheet \ | |
| --hidden-import video2ai.embed \ | |
| --hidden-import video2ai.llm \ | |
| --hidden-import video2ai.output \ | |
| --collect-data whisper \ | |
| video2ai/cli.py | |
| - name: Upload binary to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/video2ai | |
| update-homebrew: | |
| name: Update Homebrew formula | |
| runs-on: ubuntu-latest | |
| needs: [pypi] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update formula SHA | |
| env: | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: | | |
| SHA=$(curl -sL "https://github.com/sameeeeeeep/video2ai/archive/refs/tags/${TAG_NAME}.tar.gz" | shasum -a 256 | cut -d' ' -f1) | |
| sed -i "s|sha256 \".*\"|sha256 \"${SHA}\"|" Formula/video2ai.rb | |
| sed -i "s|/v[0-9.]*\.tar\.gz|/${TAG_NAME}.tar.gz|" Formula/video2ai.rb | |
| - name: Commit updated formula | |
| env: | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Formula/video2ai.rb | |
| git diff --cached --quiet || git commit -m "brew: update formula for ${TAG_NAME}" | |
| git push origin HEAD:main |