Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat: add GitHub Actions workflow for plugin release automation

Tonho4ad58aedb765
diff --git a/src-tauri/omniget-plugin-telegram/.github/workflows/release.yml b/src-tauri/omniget-plugin-telegram/.github/workflows/release.yml
new file mode 100644
index 00000000..ac8752f5
--- /dev/null
+++ b/src-tauri/omniget-plugin-telegram/.github/workflows/release.yml
@@ -0,0 +1,58 @@
+name: Release
+on:
+ push:
+ tags: ['v*']
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ include:
+ - os: windows-latest
+ target: x86_64-pc-windows-msvc
+ artifact: windows-x86_64
+ - os: ubuntu-22.04
+ target: x86_64-unknown-linux-gnu
+ artifact: linux-x86_64
+ - os: macos-latest
+ target: aarch64-apple-darwin
+ artifact: macos-aarch64
+ - os: macos-13
+ target: x86_64-apple-darwin
+ artifact: macos-x86_64
+
+ runs-on: ${{ matrix.os }}
+ permissions:
+ contents: write
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ targets: ${{ matrix.target }}
+
+ - name: Install Linux deps
+ if: runner.os == 'Linux'
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential libssl-dev libayatana-appindicator3-dev librsvg2-dev
+
+ - name: Build
+ run: cargo build --release --target ${{ matrix.target }}
+
+ - name: Package
+ shell: bash
+ run: |
+ mkdir -p dist
+ cp plugin.json dist/
+ cp target/${{ matrix.target }}/release/*.dll dist/ 2>/dev/null || true
+ cp target/${{ matrix.target }}/release/*.so dist/ 2>/dev/null || true
+ cp target/${{ matrix.target }}/release/*.dylib dist/ 2>/dev/null || true
+ if [ -d frontend ]; then cp -r frontend dist/frontend; fi
+ if [ -d assets ]; then cp -r assets dist/assets; fi
+ cd dist && zip -r ../omniget-plugin-telegram-${{ github.ref_name }}-${{ matrix.artifact }}.zip .
+
+ - uses: softprops/action-gh-release@v2
+ with:
+ files: omniget-plugin-telegram-*.zip