docs: bundle builder documentation, plugin showcase with demo GIFs #102
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: Bundle Pipe | |
| on: | |
| push: | |
| branches: ['*'] # Build on all branch pushes (artifacts only) | |
| tags: ['v*'] # Create release on version tags (v2.0.3, v2.1.0, etc.) | |
| workflow_dispatch: # Manual trigger | |
| permissions: | |
| contents: write # Required for creating releases | |
| jobs: | |
| bundle: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history needed for release notes generation | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Run bundler | |
| run: | | |
| python scripts/bundle_v2.py | |
| python scripts/bundle_v2.py --compress | |
| - name: Verify bundled files | |
| run: | | |
| python -c "import ast; ast.parse(open('open_webui_openrouter_pipe_bundled.py', encoding='utf-8').read()); print('✓ bundled.py syntax valid')" | |
| python -c "import ast; ast.parse(open('open_webui_openrouter_pipe_bundled_compressed.py', encoding='utf-8').read()); print('✓ bundled_compressed.py syntax valid')" | |
| # Always upload artifact (for testing/debugging) | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: open_webui_openrouter_pipe_bundled-${{ github.ref_name }} | |
| path: | | |
| open_webui_openrouter_pipe_bundled.py | |
| open_webui_openrouter_pipe_bundled_compressed.py | |
| retention-days: 90 | |
| # Generate release notes with commit links for versioned releases | |
| - name: Generate release notes | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| id: release_notes | |
| run: | | |
| # Get previous tag (or first commit if no previous tag) | |
| PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || git rev-list --max-parents=0 HEAD) | |
| # Generate commit list with links | |
| NOTES=$(git log --pretty=format:"- [\`%h\`](https://github.com/${{ github.repository }}/commit/%H) %s" ${PREV_TAG}..HEAD) | |
| # Handle multi-line output for GitHub Actions | |
| echo "notes<<EOF" >> $GITHUB_OUTPUT | |
| echo "## Changes" >> $GITHUB_OUTPUT | |
| echo "" >> $GITHUB_OUTPUT | |
| echo "$NOTES" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| # Create versioned release on tag push (v2.0.3, v2.1.0, etc.) | |
| - name: Create versioned release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| open_webui_openrouter_pipe_bundled.py | |
| open_webui_openrouter_pipe_bundled_compressed.py | |
| body: ${{ steps.release_notes.outputs.notes }} | |
| # Update "dev" pre-release on dev branch push | |
| - name: Update dev release | |
| if: github.ref == 'refs/heads/dev' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: dev | |
| name: Development Build | |
| body: | | |
| ⚠️ **Development build — may be unstable.** | |
| This is an automatically updated release containing the latest bundled pipe from the `dev` branch. | |
| For stable versions, use the [latest release](../../releases/latest) instead. | |
| **Direct downloads:** | |
| - [open_webui_openrouter_pipe_bundled.py](../../releases/download/dev/open_webui_openrouter_pipe_bundled.py) | |
| - [open_webui_openrouter_pipe_bundled_compressed.py](../../releases/download/dev/open_webui_openrouter_pipe_bundled_compressed.py) | |
| files: | | |
| open_webui_openrouter_pipe_bundled.py | |
| open_webui_openrouter_pipe_bundled_compressed.py | |
| prerelease: true | |
| make_latest: false # Don't mark as "Latest" (that's for versioned releases) |