chore: release v0.4.4 #21
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: Build lnvps_fw .deb | |
| # Builds the lnvps_fw_service daemon (including the eBPF datapath) into a Debian | |
| # package that installs the binary + a systemd unit. Runs on version tags and | |
| # on demand; on a tag the .deb is attached to the GitHub release. | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-deb: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Assert Cargo.toml version matches the release tag | |
| # The lnvps_fw workspace version drives the daemon self-upgrade check | |
| # (it compares its compiled CARGO_PKG_VERSION against the newest vX.Y.Z | |
| # release tag). If it lags the tag, every running daemon reports an | |
| # upgrade is available on startup and every 6h — so fail the build | |
| # rather than ship a mismatched .deb. | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| VER=$(awk '/^\[workspace.package\]/{f=1} f&&/^version[[:space:]]*=/{gsub(/.*=[[:space:]]*"|".*/,"");print;exit}' lnvps_fw/Cargo.toml) | |
| echo "tag=$TAG lnvps_fw/Cargo.toml=$VER" | |
| if [ "$VER" != "$TAG" ]; then | |
| echo "::error::lnvps_fw/Cargo.toml version ($VER) != release tag ($TAG). Bump it (in lockstep with the main workspace) before tagging." | |
| exit 1 | |
| fi | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Build dashboard (Vite single-file bundle) | |
| # The daemon embeds dashboard/dist/index.html via include_str!, so the | |
| # UI must be built before cargo compiles the service. Produces a single | |
| # self-contained index.html (JS + CSS inlined). | |
| working-directory: lnvps_fw/lnvps_fw_service/dashboard | |
| run: | | |
| bun install --frozen-lockfile | |
| bun run build | |
| - name: Install system dependencies | |
| # bpf-linker needs LLVM; libelf is used by the aya-build eBPF pipeline. | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y llvm clang libelf-dev | |
| - name: Install Rust nightly (with rust-src for the eBPF build-std) | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rust-src | |
| - name: Cache cargo + build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ~/.cargo/bin | |
| lnvps_fw/target | |
| key: fwdeb-${{ runner.os }}-${{ hashFiles('lnvps_fw/**/Cargo.lock') }} | |
| restore-keys: | | |
| fwdeb-${{ runner.os }}- | |
| - name: Install bpf-linker and cargo-deb | |
| run: | | |
| command -v bpf-linker >/dev/null || cargo install bpf-linker --locked | |
| command -v cargo-deb >/dev/null || cargo install cargo-deb --locked | |
| - name: Build .deb | |
| working-directory: lnvps_fw/lnvps_fw_service | |
| run: cargo deb | |
| - name: Locate artifact | |
| id: deb | |
| run: echo "path=$(ls lnvps_fw/target/debian/*.deb | head -1)" >> "$GITHUB_OUTPUT" | |
| - name: Show package contents | |
| run: dpkg-deb --info "${{ steps.deb.outputs.path }}" && dpkg-deb --contents "${{ steps.deb.outputs.path }}" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lnvps_fw-deb | |
| path: lnvps_fw/target/debian/*.deb | |
| - name: Attach to release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: lnvps_fw/target/debian/*.deb |