Files
voculinux/.github/workflows/nightly.yml
T
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3c94f021fd chore(deps): bump the github-actions group with 11 updates (#766)
Bumps the github-actions group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `5.1.0` | `7.0.1` |
| [actions/labeler](https://github.com/actions/labeler) | `6.2.0` | `7.0.0` |
| [actions/setup-python](https://github.com/actions/setup-python) | `5.6.0` | `7.0.0` |
| [actions/cache](https://github.com/actions/cache) | `4.3.0` | `6.1.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.6.2` | `7.0.1` |
| [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `2.6.2` | `3.0.2` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `4.3.0` | `8.0.1` |
| [actions/setup-node](https://github.com/actions/setup-node) | `5.0.0` | `7.0.0` |
| [dorny/paths-filter](https://github.com/dorny/paths-filter) | `3.0.4` | `4.0.3` |
| [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `6.8.0` | `10.0.1` |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `4.6.0` | `7.0.0` |


Updates `actions/checkout` from 5.1.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09...3d3c42e5aac5ba805825da76410c181273ba90b1)

Updates `actions/labeler` from 6.2.0 to 7.0.0
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/b8dd2d9be0f68b860e7dae5dae7d772984eacd6d...bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13)

Updates `actions/setup-python` from 5.6.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/a26af69be951a213d495a4c3e4e4022e16d87065...5fda3b95a4ea91299a34e894583c3862153e4b97)

Updates `actions/cache` from 4.3.0 to 6.1.0
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/0057852bfaa89a56745cba8c7296529d2fc39830...55cc8345863c7cc4c66a329aec7e433d2d1c52a9)

Updates `actions/upload-artifact` from 4.6.2 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/ea165f8d65b6e75b540449e92b4886f43607fa02...043fb46d1a93c77aae656e7c1c64a875d1fc6a0a)

Updates `softprops/action-gh-release` from 2.6.2 to 3.0.2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/3bb12739c298aeb8a4eeaf626c5b8d85266b0e65...3d0d9888cb7fd7b750713d6e236d1fcb99157228)

Updates `actions/download-artifact` from 4.3.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/d3f86a106a0bac45b974a628896c90dbdf5c8093...3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c)

Updates `actions/setup-node` from 5.0.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/a0853c24544627f65ddf259abe73b1d18a591444...820762786026740c76f36085b0efc47a31fe5020)

Updates `dorny/paths-filter` from 3.0.4 to 4.0.3
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dorny/paths-filter/compare/0e4a8c6effa4802afeda77dc8d303f8176d7dfad...ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d)

Updates `astral-sh/setup-uv` from 6.8.0 to 10.0.1
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/d0cc045d04ccac9d8b7881df0226f9e82c39688e...20cfd1bf945f4377ade1205e4dbc17946fc9a30d)

Updates `codecov/codecov-action` from 4.6.0 to 7.0.0
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238...fb8b3582c8e4def4969c97caa2f19720cb33a72f)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/labeler
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-python
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: softprops/action-gh-release
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: dorny/paths-filter
  dependency-version: 4.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: astral-sh/setup-uv
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: codecov/codecov-action
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-01 01:06:15 -07:00

301 lines
12 KiB
YAML

name: Nightly Build
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual triggering for testing
permissions:
contents: write # Required to create/update releases
jobs:
nightly:
name: Build and Publish Nightly
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
release_tag: ${{ steps.create_release.outputs.tag }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.11'
cache: 'pip'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build twine
# Stamped before the build, not patched into the filename after it.
# pyproject.toml takes the version from `vocalinux.version.__version__`
# (tool.setuptools.dynamic), so renaming the wheel left its own metadata
# saying 0.16.1 while the filename claimed 0.16.1.dev<date>+<sha>. pip
# tolerated that; uv rejects it as a malformed wheel, and the AppImage
# build has installed with uv since #743 — which is what broke nightly.
# __version_info__ is deliberately left alone: a dev/local suffix has no
# meaningful place in a numeric tuple, and nothing builds from it.
- name: Stamp the nightly version
id: version
run: |
set -euo pipefail
BASE_VERSION=$(grep -oP '__version__\s*=\s*"\K[^"]+' src/vocalinux/version.py)
DATE=$(date +%Y%m%d)
SHORT_SHA=$(git rev-parse --short HEAD)
NIGHTLY_VERSION="${BASE_VERSION}.dev${DATE}+${SHORT_SHA}"
sed -i "s/^__version__ = \".*\"$/__version__ = \"${NIGHTLY_VERSION}\"/" src/vocalinux/version.py
grep -q "^__version__ = \"${NIGHTLY_VERSION}\"$" src/vocalinux/version.py
echo "version=${NIGHTLY_VERSION}" >> $GITHUB_OUTPUT
echo "base_version=${BASE_VERSION}" >> $GITHUB_OUTPUT
echo "date=${DATE}" >> $GITHUB_OUTPUT
echo "sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "Building version: ${NIGHTLY_VERSION}"
- name: Build package
run: |
python -m build
ls -la dist/
# glslc is built from the pinned shaderc commit inside the container -
# Ubuntu 22.04 packages none - and depends on nothing but that commit.
- name: Cache AppImage build tools
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/vocalinux-appimage
key: appimage-tools-${{ runner.arch }}-${{ hashFiles('packaging/appimage/tool_checksums.txt') }}
- name: Build AppImage (x86_64)
env:
VOCALINUX_APPIMAGE_REQUIRE_VULKAN: "1"
run: |
bash packaging/appimage/docker-build.sh dist/*.whl "${{ steps.version.outputs.version }}" dist
ls -la dist/*.AppImage
- name: Cleanup old nightly releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Calculate the cutoff date (3 days ago) in seconds since epoch
CUTOFF_DATE=$(date -d '3 days ago' +%s)
echo "Cutoff date: $(date -d @$CUTOFF_DATE -u +"%Y-%m-%d %H:%M:%S UTC") (3 days ago)"
# Get nightly releases with their actual creation timestamps using JSON output
# Filter for releases older than 3 days and delete them
gh release list --repo ${{ github.repository }} --json tagName,createdAt --limit 100 | \
jq -r '.[] | select(.tagName | startswith("nightly-")) | [.tagName, .createdAt] | @tsv' | \
while IFS=$'\t' read -r tag created_at; do
# Parse the ISO 8601 date to seconds since epoch
RELEASE_DATE=$(date -d "$created_at" +%s 2>/dev/null || echo "0")
if [ "$RELEASE_DATE" != "0" ] && [ "$RELEASE_DATE" -lt "$CUTOFF_DATE" ]; then
echo "Deleting old nightly release: $tag (created: $(date -d @$RELEASE_DATE -u +"%Y-%m-%d %H:%M:%S UTC"))"
gh release delete "$tag" --yes --repo ${{ github.repository }} 2>/dev/null || true
git push origin :refs/tags/"$tag" 2>/dev/null || true
git tag -d "$tag" 2>/dev/null || true
else
echo "Keeping nightly release: $tag (created: $(date -d @$RELEASE_DATE -u +"%Y-%m-%d %H:%M:%S UTC"))"
fi
done
- name: Generate release notes
id: release_notes
run: |
COMMIT_MSG=$(git log -1 --pretty=format:"%s" HEAD)
COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an" HEAD)
COMMIT_DATE=$(git log -1 --pretty=format:"%ci" HEAD)
COMMIT_BODY=$(git log -1 --pretty=format:"%b" HEAD)
# Get recent commits (last 10) for changelog
RECENT_COMMITS=$(git log --oneline -10 --no-decorate | sed 's/^/- /')
# Get changes since last tag (if exists)
LAST_TAG=$(git describe --tags --abbrev=0 --match "nightly-*" 2>/dev/null || echo "")
if [ -n "$LAST_TAG" ]; then
CHANGES_SINCE=$(git log --oneline "$LAST_TAG"..HEAD --no-decorate | sed 's/^/- /')
CHANGES_SECTION="### Changes Since Last Nightly
${CHANGES_SINCE:-"*No new commits since last nightly*"}"
else
CHANGES_SECTION="### Recent Commits
${RECENT_COMMITS}"
fi
cat > /tmp/release_notes.md << EOF
## Nightly Build ${{ steps.version.outputs.version }}
**This is a nightly development build. It may contain bugs or incomplete features. Use at your own risk.**
---
### What's in This Build
**Commit Details:**
- **SHA:** \`${{ steps.version.outputs.sha }}\`
- **Message:** ${COMMIT_MSG}
- **Author:** ${COMMIT_AUTHOR}
- **Date:** ${COMMIT_DATE}
${CHANGES_SECTION}
---
### Installation
#### Quick Install (Recommended)
Download the wheel file below and install:
\`\`\`bash
pip install vocalinux-${{ steps.version.outputs.version }}-py3-none-any.whl
\`\`\`
#### From PyPI (Stable)
For the latest stable release:
\`\`\`bash
pip install vocalinux
\`\`\`
#### Using Install Script
\`\`\`bash
curl -fsSL https://raw.githubusercontent.com/VocaHQ/vocalinux/main/install.sh | bash
\`\`\`
#### AppImage (no install, no root)
Download the \`.AppImage\` matching your CPU (\`x86_64\` or \`aarch64\`) below:
\`\`\`bash
chmod +x Vocalinux-${{ steps.version.outputs.version }}-x86_64.AppImage
./Vocalinux-${{ steps.version.outputs.version }}-x86_64.AppImage
\`\`\`
Requires \`xdotool\`/\`wtype\`/\`ydotool\` on the host for text injection, same as the PyPI install path.
---
### Build Information
| Property | Value |
|----------|-------|
| **Version** | ${{ steps.version.outputs.version }} |
| **Base Version** | ${{ steps.version.outputs.base_version }} |
| **Build Date** | ${{ steps.version.outputs.date }} |
| **Python** | 3.11+ |
| **OS** | Linux (X11 & Wayland) |
---
### Files
- **\`vocalinux-${{ steps.version.outputs.version }}-py3-none-any.whl\`** - Python wheel (recommended)
- **\`vocalinux-${{ steps.version.outputs.version }}.tar.gz\`** - Source distribution
- **\`Vocalinux-${{ steps.version.outputs.version }}-x86_64.AppImage\`** - Self-contained, no install (Intel/AMD)
- **\`Vocalinux-${{ steps.version.outputs.version }}-aarch64.AppImage\`** - Self-contained, no install (ARM64, added shortly after this release is published)
---
### Links
- [Documentation](https://vocalinux.com)
- [Report Issues](https://github.com/VocaHQ/vocalinux/issues)
- [Other Releases](https://github.com/VocaHQ/vocalinux/releases)
---
*Only the 3 most recent nightly builds are kept. This build will be automatically deleted when newer nightlies are created.*
*Generated on $(date -u +"%Y-%m-%d %H:%M:%S UTC")*
EOF
echo "notes_file=/tmp/release_notes.md" >> $GITHUB_OUTPUT
- name: Create nightly release
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Create release with dated tag: nightly-2025-02-11
RELEASE_TAG="nightly-$(date +%Y-%m-%d)"
# If a release for today already exists, delete it first
gh release delete "$RELEASE_TAG" --yes --repo ${{ github.repository }} 2>/dev/null || true
git push origin :refs/tags/"$RELEASE_TAG" 2>/dev/null || true
git tag -d "$RELEASE_TAG" 2>/dev/null || true
gh release create "$RELEASE_TAG" \
--title "Nightly Build - ${{ steps.version.outputs.version }}" \
--notes-file ${{ steps.release_notes.outputs.notes_file }} \
--prerelease \
dist/*
echo "tag=${RELEASE_TAG}" >> "$GITHUB_OUTPUT"
- name: Upload artifacts (backup)
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vocalinux-nightly-${{ steps.version.outputs.version }}
path: dist/
retention-days: 7
nightly-appimage-arm64:
name: Build and Attach Nightly AppImage (aarch64)
runs-on: ubuntu-24.04-arm
needs: nightly
if: needs.nightly.result == 'success'
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.11'
cache: 'pip'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
# This job builds its own wheel, so it needs the same stamp: without it
# the aarch64 AppImage bundles a wheel calling itself 0.16.1 while the
# release it is attached to is 0.16.1.dev<date>+<sha>.
- name: Stamp the nightly version
run: |
set -euo pipefail
VERSION="${{ needs.nightly.outputs.version }}"
sed -i "s/^__version__ = \".*\"$/__version__ = \"${VERSION}\"/" src/vocalinux/version.py
grep -q "^__version__ = \"${VERSION}\"$" src/vocalinux/version.py
- name: Build package
run: |
python -m build
ls -la dist/
# glslc is built from the pinned shaderc commit inside the container -
# Ubuntu 22.04 packages none - and depends on nothing but that commit.
- name: Cache AppImage build tools
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/vocalinux-appimage
key: appimage-tools-${{ runner.arch }}-${{ hashFiles('packaging/appimage/tool_checksums.txt') }}
- name: Build AppImage (aarch64)
env:
VOCALINUX_APPIMAGE_REQUIRE_VULKAN: "1"
run: |
bash packaging/appimage/docker-build.sh dist/*.whl "${{ needs.nightly.outputs.version }}" dist
ls -la dist/*.AppImage
- name: Attach to nightly release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ needs.nightly.outputs.release_tag }}" \
dist/*.AppImage \
--repo ${{ github.repository }} \
--clobber