minor tag change to leetha lint #1
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 | |
| packages: write | |
| jobs: | |
| build-frontend: | |
| runs-on: ubuntu-latest | |
| name: Build Leetha Frontend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: cd frontend && bun install --frozen-lockfile && bun run build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend-dist | |
| path: src/leetha/ui/web/dist/ | |
| build-wheel: | |
| needs: build-frontend | |
| runs-on: ubuntu-latest | |
| name: Build Leetha Wheel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: frontend-dist | |
| path: src/leetha/ui/web/dist/ | |
| - run: pip install build | |
| - run: python -m build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel | |
| path: dist/* | |
| build-deb: | |
| needs: build-frontend | |
| runs-on: ubuntu-latest | |
| name: Build Leetha Deb | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: frontend-dist | |
| path: src/leetha/ui/web/dist/ | |
| - name: Install fpm | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y ruby ruby-dev | |
| sudo gem install fpm | |
| - name: Build deb package | |
| run: | | |
| python -m venv /tmp/leetha-venv | |
| /tmp/leetha-venv/bin/pip install . | |
| fpm -s dir -t deb \ | |
| --name leetha \ | |
| --version ${GITHUB_REF_NAME#v} \ | |
| --architecture amd64 \ | |
| --depends python3 \ | |
| --depends libpcap0.8 \ | |
| --description "Passive network fingerprinting and analysis engine" \ | |
| --url "https://github.com/tjnull/leetha" \ | |
| --license "GPL-3.0" \ | |
| /tmp/leetha-venv/lib/=/usr/lib/leetha/ \ | |
| /tmp/leetha-venv/bin/leetha=/usr/bin/leetha | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: deb | |
| path: "*.deb" | |
| build-rpm: | |
| needs: build-frontend | |
| runs-on: ubuntu-latest | |
| name: Build Leetha RPM | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: frontend-dist | |
| path: src/leetha/ui/web/dist/ | |
| - name: Install fpm | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y ruby ruby-dev rpm | |
| sudo gem install fpm | |
| - name: Build rpm package | |
| run: | | |
| python -m venv /tmp/leetha-venv | |
| /tmp/leetha-venv/bin/pip install . | |
| fpm -s dir -t rpm \ | |
| --name leetha \ | |
| --version ${GITHUB_REF_NAME#v} \ | |
| --architecture x86_64 \ | |
| --depends python3 \ | |
| --depends libpcap \ | |
| --description "Passive network fingerprinting and analysis engine" \ | |
| --url "https://github.com/tjnull/leetha" \ | |
| --license "GPL-3.0" \ | |
| /tmp/leetha-venv/lib/=/usr/lib/leetha/ \ | |
| /tmp/leetha-venv/bin/leetha=/usr/bin/leetha | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpm | |
| path: "*.rpm" | |
| build-macos: | |
| needs: build-frontend | |
| runs-on: macos-latest | |
| name: Build Leetha macOS | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: frontend-dist | |
| path: src/leetha/ui/web/dist/ | |
| - run: | | |
| pip install . pyinstaller | |
| pyinstaller --onefile --name leetha src/leetha/cli.py | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-binary | |
| path: dist/leetha | |
| build-windows: | |
| needs: build-frontend | |
| runs-on: windows-latest | |
| name: Build Leetha Windows | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: frontend-dist | |
| path: src/leetha/ui/web/dist/ | |
| - run: | | |
| pip install . pyinstaller | |
| pyinstaller --onefile --name leetha src/leetha/cli.py | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-binary | |
| path: dist/leetha.exe | |
| release: | |
| needs: [build-frontend, build-wheel, build-deb, build-rpm, build-macos, build-windows] | |
| runs-on: ubuntu-latest | |
| name: Create Leetha Release | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| path: artifacts/ | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/* | |
| generate_release_notes: true |