chore(release): v0.1.6 #18
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
| # SPDX-FileCopyrightText: Kevin Stenzel | |
| # SPDX-License-Identifier: GPL-3.0-or-later | |
| # Build the control-plane .deb and publish it: always as a workflow artifact, and on a | |
| # v* tag also as a GitHub Release asset -> install with `apt install ./linuxmuster-radius_*.deb`. | |
| name: build-deb | |
| on: | |
| push: | |
| tags: ["v*"] | |
| branches: [main] | |
| paths: ["controlplane/**", "packaging/**", ".github/workflows/build-deb.yml"] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Package version (no leading v)" | |
| default: "0.0.0-dev" | |
| permissions: | |
| contents: write # create/upload the GitHub Release asset on a tag | |
| jobs: | |
| build: | |
| # Match the target OS so the venv's python interpreter (3.12) lines up. | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install build deps | |
| run: sudo apt-get update -qq && sudo apt-get install -y -qq python3-venv | |
| - name: Determine version | |
| id: ver | |
| run: | | |
| if [ "${GITHUB_REF_TYPE}" = "tag" ]; then | |
| v="${GITHUB_REF_NAME#v}" | |
| else | |
| v="${{ github.event.inputs.version || '0.0.0-dev' }}" | |
| fi | |
| echo "version=$v" >> "$GITHUB_OUTPUT" | |
| - name: Build .deb | |
| run: sudo VERSION="${{ steps.ver.outputs.version }}" bash packaging/build-deb.sh | |
| # Install smoke test: actually install the built package and use it the way the | |
| # docs tell an admin to. Building alone proved nothing about the installed layout — | |
| # v0.1.0..v0.1.3 shipped without the CLI on PATH and no pipeline noticed. | |
| - name: Install smoke test | |
| run: | | |
| set -eux | |
| sudo apt-get install -y ./linuxmuster-radius_*.deb | |
| test "$(command -v lmnradius)" = /usr/bin/lmnradius | |
| sudo lmnradius --help >/dev/null | |
| # postinst enabled + started the service; the API must answer like the docs promise. | |
| ok=0 | |
| for i in $(seq 1 30); do | |
| if sudo lmnradius health >/dev/null 2>&1; then ok=1; break; fi | |
| sleep 1 | |
| done | |
| if [ "$ok" != 1 ]; then | |
| systemctl status linuxmuster-radius.service --no-pager || true | |
| sudo journalctl -u linuxmuster-radius.service --no-pager | tail -50 || true | |
| exit 1 | |
| fi | |
| sudo lmnradius health | |
| - name: Upload workflow artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linuxmuster-radius-deb | |
| path: linuxmuster-radius_*.deb | |
| if-no-files-found: error | |
| - name: Publish to the GitHub Release (tags only) | |
| if: github.ref_type == 'tag' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create "${GITHUB_REF_NAME}" --title "${GITHUB_REF_NAME}" --generate-notes || true | |
| gh release upload "${GITHUB_REF_NAME}" linuxmuster-radius_*.deb --clobber |