name: release # Cut a release ONLY when a v* tag is pushed. Regular pushes do nothing. # The tag name becomes the release version and the binary name suffix. on: push: tags: - 'v*' jobs: release: permissions: contents: write runs-on: codeberg-small steps: # Full history so make_release.py can build changelog since the last tag. - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install package + dev deps run: | python -m pip install --upgrade pip pip install -e .[dev] - name: Run tests run: pytest -q - name: Build single-file executable # --onefile bundles the interpreter: a true standalone binary. # zubble+benchlib are pure stdlib, so the bundle is small and # there is no fragile third-party dependency packing to go wrong. run: pyinstaller --onefile --name zubble zubble/cli.py - name: Smoke test the binary # Validates the executable actually launches and parses args — # never ship a build that can't even print --version. run: | ./dist/zubble --version ./dist/zubble --help | head -1 - name: Create release and upload binary env: FORGEJO_TOKEN: ${{ secrets.GITHUB_TOKEN }} FORGEJO_API: ${{ github.server_url }}/api/v1 REPO: ${{ github.repository }} TAG: ${{ github.ref_name }} run: python scripts/make_release.py dist/zubble