Fix hardcoded version in installation examples #7
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
| name: Create volmix Release | ||
|
Check failure on line 1 in .github/workflows/create-release.yml
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'Release version (e.g., v1.0.1)' | ||
| required: true | ||
| type: string | ||
| build_type: | ||
| description: 'Build type' | ||
| required: true | ||
| default: 'release' | ||
| type: choice | ||
| options: | ||
| - 'release' | ||
| - 'debug' | ||
| prerelease: | ||
| description: 'Mark as prerelease' | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
| architectures: | ||
| description: 'Architectures to build (comma-separated)' | ||
| required: false | ||
| default: 'amd64,arm64' | ||
| type: string | ||
| jobs: | ||
| build-packages: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| architecture: ${{ fromJSON(format('["{0}"]', join(split(inputs.architectures, ','), '","'))) }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Build package for ${{ matrix.architecture }} | ||
| run: | | ||
| echo "Building Debian package for ${{ matrix.architecture }}" | ||
| echo "Build type: ${{ inputs.build_type }}" | ||
| # Use our existing build script with parameters | ||
| chmod +x build-package.sh | ||
| ./build-package.sh "${{ matrix.architecture }}" "${{ inputs.build_type }}" | ||
| - name: Verify package creation | ||
| run: | | ||
| echo "Checking for generated .deb packages..." | ||
| debs=$(find . -maxdepth 1 -type f -name '*.deb') | ||
| if [ -z "$debs" ]; then | ||
| echo "ERROR: No .deb packages found!" | ||
| exit 1 | ||
| fi | ||
| # Show package info | ||
| echo "Package details for ${{ matrix.architecture }}:" | ||
| for deb in $debs; do | ||
| echo "=== $deb ===" | ||
| dpkg --info "$deb" | ||
| echo | ||
| done | ||
| - name: Upload build artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: volmix-packages-${{ matrix.architecture }}-${{ inputs.build_type }} | ||
| path: | | ||
| *.deb | ||
| *.changes | ||
| *.buildinfo | ||
| retention-days: 7 | ||
| compression-level: 0 | ||
| overwrite: true | ||
| create-release: | ||
| needs: build-packages | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Download all build artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: volmix-packages-* | ||
| merge-multiple: true | ||
| path: ./packages | ||
| - name: List downloaded packages | ||
| run: | | ||
| echo "Downloaded packages:" | ||
| find ./packages -name "*.deb" -type f | sort | ||
| - name: Generate release notes | ||
| id: release_notes | ||
| run: | | ||
| echo "Generating release notes for ${{ inputs.version }}" | ||
| # Get current date | ||
| BUILD_DATE=$(date -u '+%Y-%m-%d %H:%M:%S UTC') | ||
| # Count packages | ||
| DEB_COUNT=$(find ./packages -name "*.deb" -type f | wc -l) | ||
| # List architectures built | ||
| ARCHS="" | ||
| for deb in ./packages/*.deb; do | ||
| if [ -f "$deb" ]; then | ||
| arch=$(dpkg-deb -f "$deb" Architecture 2>/dev/null) | ||
| if [ $? -ne 0 ] || [ -z "$arch" ]; then | ||
| echo "WARNING: Failed to get architecture for $deb, skipping." | ||
| continue | ||
| fi | ||
| if [[ ! "$ARCHS" =~ $arch ]]; then | ||
| ARCHS="$ARCHS $arch" | ||
| fi | ||
| fi | ||
| done | ||
| ARCHS=$(echo "$ARCHS" | xargs) # trim whitespace | ||
| # Create release notes | ||
| cat > release_notes.md << EOF | ||
| # volmix ${{ inputs.version }} | ||
| Per-application audio control tool for Linux using PulseAudio. | ||
| ## π¦ Package Information | ||
| - **Build Date**: $BUILD_DATE | ||
| - **Build Type**: ${{ inputs.build_type }} | ||
| - **Architectures**: $ARCHS | ||
| - **Packages**: $DEB_COUNT .deb files | ||
| ## π₯ Installation | ||
| ### Debian/Ubuntu: | ||
| \`\`\`bash | ||
| # Download the appropriate .deb package for your architecture | ||
| wget https://github.com/cwage/volmix/releases/download/${{ inputs.version }}/volmix_*_<your-arch>.deb | ||
| # Install the package | ||
| sudo dpkg -i volmix_*_<your-arch>.deb | ||
| # Install any missing dependencies | ||
| sudo apt-get install -f | ||
| \`\`\` | ||
| ### Available Architectures: | ||
| EOF | ||
| # Add download links for each architecture | ||
| for deb in ./packages/*.deb; do | ||
| if [ -f "$deb" ]; then | ||
| basename_deb=$(basename "$deb") | ||
| arch=$(dpkg-deb -f "$deb" Architecture 2>/dev/null) | ||
| if [ $? -ne 0 ] || [ -z "$arch" ]; then | ||
| echo "- **Unknown Architecture**: [\`$basename_deb\`](https://github.com/cwage/volmix/releases/download/${{ inputs.version }}/$basename_deb) (Error reading architecture)" >> release_notes.md | ||
| else | ||
| size=$(ls -lh "$deb" | awk '{print $5}') | ||
| echo "- **$arch**: [\`$basename_deb\`](https://github.com/cwage/volmix/releases/download/${{ inputs.version }}/$basename_deb) ($size)" >> release_notes.md | ||
| fi | ||
| fi | ||
| done | ||
| cat >> release_notes.md << EOF | ||
| ## π Features | ||
| - System tray integration with volume control popup | ||
| - Per-application volume control for active audio streams | ||
| - Master volume control via mouse wheel on tray icon | ||
| - Toggle popup visibility by clicking tray icon | ||
| - Right-click context menu for quick access to quit option | ||
| ## π Bug Reports | ||
| Please report issues at: https://github.com/cwage/volmix/issues | ||
| EOF | ||
| echo "Release notes generated:" | ||
| cat release_notes.md | ||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ inputs.version }} | ||
| name: volmix ${{ inputs.version }} | ||
| body_path: release_notes.md | ||
| prerelease: ${{ inputs.prerelease }} | ||
| files: | | ||
| ./packages/*.deb | ||
| ./packages/*.changes | ||
| ./packages/*.buildinfo | ||
| fail_on_unmatched_files: false | ||
| generate_release_notes: false | ||
| make_latest: ${{ !inputs.prerelease }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Generate workflow summary | ||
| run: | | ||
| echo "## π Release Created Successfully!" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "**Release**: [${{ inputs.version }}](https://github.com/cwage/volmix/releases/tag/${{ inputs.version }})" >> $GITHUB_STEP_SUMMARY | ||
| echo "**Build Type**: ${{ inputs.build_type }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "**Prerelease**: ${{ inputs.prerelease }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "### π¦ Packages Included" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| for deb in ./packages/*.deb; do | ||
| if [ -f "$deb" ]; then | ||
| basename_deb=$(basename "$deb") | ||
| arch=$(dpkg-deb -f "$deb" Architecture 2>/dev/null) | ||
| if [ $? -ne 0 ] || [ -z "$arch" ]; then | ||
| echo "β οΈ Warning: Failed to extract architecture from $basename_deb" >> $GITHUB_STEP_SUMMARY | ||
| arch="unknown" | ||
| fi | ||
| size=$(ls -lh "$deb" | awk '{print $5}') | ||
| echo "- **$arch**: \`$basename_deb\` ($size)" >> $GITHUB_STEP_SUMMARY | ||
| fi | ||
| done | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "π [View Release](https://github.com/cwage/volmix/releases/tag/${{ inputs.version }})" >> $GITHUB_STEP_SUMMARY | ||