Files
dnsmasq-webui/.github/workflows/release.yml
T
alex 2f049feed2 Install script, static assets, UI and release workflow updates
- install.sh: default dirs, --update/--service/--uninstall/--purge, in-dir dnsmasq-webui symlink, ContentRootPath note
- UseStaticFiles instead of MapStaticAssets (fix 0-byte assets)
- Program: ContentRootPath when not Development for symlink/CWD
- App.razor: direct asset paths
- Dnsmasq page: remove redundant status pre, margin above Reload button
- Sidebar: logo 64px via app.css, hamburger vertically centered, toggler inside top-row
- ApplicationTitle documented in README
- publish/release: RIDs, Docker build for glibc
2026-02-05 02:00:36 +10:00

80 lines
2.5 KiB
YAML

# Build self-contained binaries for portable Linux RIDs when a version tag is pushed,
# then create/update the release and attach the zips as release assets.
# linux-x64 and linux-arm64 are built inside a container (Debian-based SDK image) so
# the resulting binaries work across glibc-based distros (Ubuntu, Debian, etc.).
# Run: push a tag (e.g. v1.0.0); the workflow builds that commit and uploads assets.
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
strategy:
fail-fast: false
matrix:
rid:
- linux-x64
- linux-arm64
- linux-musl-x64
- linux-musl-arm64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish for ${{ matrix.rid }} (glibc in Docker)
if: matrix.rid == 'linux-x64' || matrix.rid == 'linux-arm64'
run: |
docker run --rm \
-v "${{ github.workspace }}:/src" -w /src \
mcr.microsoft.com/dotnet/sdk:9.0 \
./scripts/publish-self-contained.sh ${{ matrix.rid }}
- name: Setup .NET
if: matrix.rid == 'linux-musl-x64' || matrix.rid == 'linux-musl-arm64'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Publish for ${{ matrix.rid }} (musl on host)
if: matrix.rid == 'linux-musl-x64' || matrix.rid == 'linux-musl-arm64'
run: ./scripts/publish-self-contained.sh ${{ matrix.rid }}
- name: Zip publish output
run: |
PUBLISH_DIR="src/DnsmasqWebUI/bin/Release/net9.0/${{ matrix.rid }}/publish"
(cd "$PUBLISH_DIR" && zip -r "../../../../../../../dnsmasq-webui-${{ matrix.rid }}.zip" .)
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dnsmasq-webui-${{ matrix.rid }}
path: dnsmasq-webui-${{ matrix.rid }}.zip
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all build artifacts
uses: actions/download-artifact@v4
- name: Collect zips into workspace root
run: |
for dir in dnsmasq-webui-*/; do
[ -d "$dir" ] && cp "$dir"/*.zip . 2>/dev/null || true
done
- name: Create release and upload assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
files: dnsmasq-webui-*.zip
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}