feat: rich content previews, link handling, and startup optimizations #41
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate-changelog: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.get_version.outputs.version }} | |
| changelog: ${{ steps.changelog.outputs.changelog }} | |
| release_body: ${{ steps.release_notes.outputs.body }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract version | |
| id: get_version | |
| run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| set -e | |
| PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") | |
| if [ -z "$PREV_TAG" ]; then | |
| CHANGELOG=$(git log --pretty=format:"- %s" ${{ github.ref_name }}) | |
| else | |
| CHANGELOG=$(git log --pretty=format:"- %s" $PREV_TAG..${{ github.ref_name }}) | |
| fi | |
| CHANGELOG=$(echo "$CHANGELOG" | grep -vE "^(chore|ci|docs):" || echo "- Initial release") | |
| echo "changelog<<EOF" >> $GITHUB_OUTPUT | |
| echo "$CHANGELOG" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Generate release notes | |
| id: release_notes | |
| run: | | |
| cat > release_body.md << 'EOF' | |
| # 🎉 Clipse GUI v${{ steps.get_version.outputs.version }} | |
| A GTK3 graphical user interface for the excellent | |
| [clipse](https://github.com/savedra1/clipse). | |
| ## 📝 Changelog | |
| ${{ steps.changelog.outputs.changelog }} | |
| EOF | |
| echo "body<<EOF" >> $GITHUB_OUTPUT | |
| cat release_body.md >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| build-linux-x86_64: | |
| runs-on: ubuntu-latest | |
| needs: generate-changelog | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| python3-venv python3-dev python3-gi python3-gi-cairo \ | |
| gir1.2-gtk-3.0 libgirepository1.0-dev build-essential \ | |
| libssl-dev zlib1g-dev patchelf libcairo2-dev pkg-config | |
| - name: Build | |
| run: | | |
| set -e | |
| python3 -m venv --system-site-packages venv | |
| . venv/bin/activate | |
| pip install -U pip Nuitka==2.6.9 ordered-set==4.1.0 zstandard==0.23.0 | |
| make nuitka | |
| mv dist/clipse-gui.bin \ | |
| dist/clipse-gui-v${{ needs.generate-changelog.outputs.version }}-linux-x86_64 | |
| chmod +x dist/* | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-x86_64 | |
| path: dist/clipse-gui-v${{ needs.generate-changelog.outputs.version }}-linux-x86_64 | |
| build-appimage: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - generate-changelog | |
| - build-linux-x86_64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download linux binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-x86_64 | |
| path: dist | |
| - name: Install AppImage tools | |
| run: | | |
| set -e | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libfuse2 wget patchelf desktop-file-utils | |
| wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
| wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh | |
| chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-gtk.sh | |
| - name: Prepare AppDir | |
| run: | | |
| set -e | |
| mkdir -p AppDir/usr/bin | |
| mv dist/clipse-gui-v${{ needs.generate-changelog.outputs.version }}-linux-x86_64 \ | |
| AppDir/usr/bin/clipse-gui | |
| chmod +x AppDir/usr/bin/clipse-gui | |
| - name: Add desktop file | |
| run: | | |
| cat > AppDir/clipse-gui.desktop << EOF | |
| [Desktop Entry] | |
| Type=Application | |
| Name=Clipse GUI | |
| Exec=clipse-gui | |
| Icon=clipse-gui | |
| Categories=Utility; | |
| Terminal=false | |
| EOF | |
| - name: Add icon | |
| run: | | |
| # Copy icon to hicolor theme directory (for GTK) | |
| mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps | |
| cp clipse-gui.png AppDir/usr/share/icons/hicolor/256x256/apps/clipse-gui.png | |
| # Copy icon to AppDir root (required by appimagetool) | |
| cp clipse-gui.png AppDir/clipse-gui.png | |
| - name: Build AppImage | |
| run: | | |
| set -e | |
| export ARCH=x86_64 | |
| export DEPLOY_GTK_VERSION=3 | |
| ./linuxdeploy-x86_64.AppImage \ | |
| --appdir AppDir \ | |
| --plugin gtk \ | |
| --output appimage | |
| mv Clipse_GUI-*.AppImage \ | |
| clipse-gui-v${{ needs.generate-changelog.outputs.version }}-linux-x86_64.AppImage | |
| - name: Upload AppImage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: appimage-x86_64 | |
| path: clipse-gui-v${{ needs.generate-changelog.outputs.version }}-linux-x86_64.AppImage | |
| build-linux-arm64: | |
| runs-on: ubuntu-24.04-arm | |
| needs: generate-changelog | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| python3-venv python3-dev python3-gi python3-gi-cairo \ | |
| gir1.2-gtk-3.0 libgirepository1.0-dev build-essential \ | |
| libssl-dev zlib1g-dev patchelf libcairo2-dev pkg-config | |
| - name: Build | |
| run: | | |
| set -e | |
| python3 -m venv --system-site-packages venv | |
| . venv/bin/activate | |
| pip install -U pip Nuitka==2.6.9 ordered-set==4.1.0 zstandard==0.23.0 | |
| make nuitka | |
| mv dist/clipse-gui.bin \ | |
| dist/clipse-gui-v${{ needs.generate-changelog.outputs.version }}-linux-aarch64 | |
| chmod +x dist/* | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-arm64 | |
| path: dist/clipse-gui-v${{ needs.generate-changelog.outputs.version }}-linux-aarch64 | |
| create-release: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - generate-changelog | |
| - build-linux-x86_64 | |
| - build-linux-arm64 | |
| - build-appimage | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: "Release v${{ needs.generate-changelog.outputs.version }}" | |
| body: ${{ needs.generate-changelog.outputs.release_body }} | |
| files: | | |
| artifacts/linux-x86_64/* | |
| artifacts/linux-arm64/* | |
| artifacts/appimage-x86_64/* |