Skip to content
This repository was archived by the owner on Aug 26, 2026. It is now read-only.

fix: add HTTP Range request support for recording playback #28

fix: add HTTP Range request support for recording playback

fix: add HTTP Range request support for recording playback #28

name: Build, Push & Release
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compute version (YEAR.WEEK.N)
id: version
run: |
YEAR=$(date -u +%Y)
WEEK=$(date -u +%V)
# Remove leading zero for clean version number
WEEK_NUM=$((10#$WEEK))
WEEK_PAD=$(printf "%02d" "$WEEK_NUM")
# Find existing releases for this year.week prefix
PREFIX="${YEAR}.${WEEK_PAD}"
LATEST=$(gh release list --limit 100 --json tagName -q \
"[.[] | select(.tagName | startswith(\"${PREFIX}.\"))] | length")
N=$(( LATEST + 1 ))
VERSION="${PREFIX}.${N}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Computed version: $VERSION"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU (multi-platform)
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/raccommode/p-streamrec
tags: |
type=raw,value=${{ steps.version.outputs.version }}
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
APP_VERSION=${{ steps.version.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.version }}
name: v${{ steps.version.outputs.version }}
generate_release_notes: true