Skip to content

fix(pulseaudio): derive client names for streams registering empty ones #458

fix(pulseaudio): derive client names for streams registering empty ones

fix(pulseaudio): derive client names for streams registering empty ones #458

Workflow file for this run

name: Build
on:
push:
branches: [main, master]
tags: ['v*']
pull_request:
workflow_dispatch:
jobs:
build-artifacts:
name: Build binaries and packages
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0 # required for git describe (VERSION computation)
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: '1.25'
- name: Cache Go modules
uses: actions/cache@v6
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-
- name: Install Task
uses: arduino/setup-task@v3
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nfpm
run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.43.1
- name: Build all binaries
run: task build:all-arch
- name: Build all packages
run: task package:all
- name: Upload binaries
uses: actions/upload-artifact@v7
with:
name: binaries-${{ github.sha }}
path: dist/odio-api-linux-*
retention-days: 7
- name: Upload packages
uses: actions/upload-artifact@v7
with:
name: packages-${{ github.sha }}
path: |
dist/*.deb
dist/*.rpm
retention-days: 7
build-docker:
name: Build Docker images (multi-arch)
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Compute version and Docker tags
id: version
run: |
IMAGE="ghcr.io/${{ github.repository }}"
if git describe --tags --exact-match HEAD 2>/dev/null; then
VERSION=$(git describe --tags --exact-match HEAD)
TAGS="${IMAGE}:${VERSION},${IMAGE}:latest"
else
BASE_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "dev")
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
if [ -n "$BRANCH" ] && [ "$BRANCH" != "HEAD" ]; then
CLEAN_BRANCH=$(echo "$BRANCH" | sed 's/[^a-zA-Z0-9._-]/-/g')
VERSION="${BASE_TAG}-${CLEAN_BRANCH}"
else
VERSION=$(git describe --tags --always 2>/dev/null || echo "dev")
fi
TAGS="${IMAGE}:${VERSION}"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to GHCR
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images (multi-arch)
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
tags: ${{ steps.version.outputs.tags }}
build-args: |
VERSION=${{ steps.version.outputs.version }}
labels: |
org.opencontainers.image.title=odio-api
org.opencontainers.image.description=The universal remote for your Linux multimedia server
org.opencontainers.image.version=${{ steps.version.outputs.version }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.url=https://github.com/${{ github.repository }}
org.opencontainers.image.licenses=BSD-2-Clause
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build-artifacts
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Download binaries
uses: actions/download-artifact@v8
with:
name: binaries-${{ github.sha }}
path: dist/
- name: Download packages
uses: actions/download-artifact@v8
with:
name: packages-${{ github.sha }}
path: dist/
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
files: dist/*
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, '-') }}
# Add this job at the end of your existing release workflow in
# go-odio-api and go-mpd-discplayer (.github/workflows/build.yml)
#
# It triggers the apt-repo rebuild after a successful release.
notify-apt-repo:
name: Trigger APT repo update
needs: release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions: {}
steps:
- name: Trigger apt-repo rebuild
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.APT_REPO_TOKEN }}
repository: b0bbywan/odio-apt-repo
event-type: release-published
client-payload: '{"repo": "${{ github.repository }}", "tag": "${{ github.ref_name }}"}'