feat: update version to 0.5.0 and add release notes for visual and ac… #49
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*.*.*' | |
| jobs: | |
| publish-tauri: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: 'macos-latest' | |
| args: '--target aarch64-apple-darwin' | |
| - platform: 'macos-latest' | |
| args: '--target x86_64-apple-darwin' | |
| - platform: 'ubuntu-22.04' | |
| args: '' | |
| - platform: 'ubuntu-24.04-arm' | |
| args: '' | |
| - platform: 'windows-latest' | |
| args: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies (Ubuntu only) | |
| if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| - uses: pnpm/action-setup@v5 | |
| - name: Install frontend dependencies | |
| run: pnpm install | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-tauri -> target' | |
| - uses: tauri-apps/tauri-action@v0 | |
| id: tauri-build | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| LDAI_UPDATE_INFORMATION: ${{ contains(matrix.platform, 'ubuntu') && 'gh-releases-zsync|tonhowtf|omniget|latest|*AppImage.zsync' || '' }} | |
| with: | |
| tagName: v__VERSION__ | |
| releaseName: 'OmniGet v__VERSION__' | |
| releaseBody: 'Download the installer for your platform below.' | |
| releaseDraft: true | |
| prerelease: false | |
| includeUpdaterJson: false | |
| args: ${{ matrix.args }} | |
| - name: Generate and upload AppImage zsync files | |
| if: contains(matrix.platform, 'ubuntu') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| sudo apt-get install -y zsync | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| for appimage in src-tauri/target/release/bundle/appimage/*.AppImage; do | |
| if [ -f "$appimage" ]; then | |
| zsyncmake "$appimage" -o "${appimage}.zsync" -u "$(basename "$appimage")" | |
| gh release upload "$TAG" "${appimage}.zsync" --repo "${{ github.repository }}" --clobber | |
| fi | |
| done | |
| - name: Upload Windows portable binary | |
| if: matrix.platform == 'windows-latest' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| $TAG = "${{ github.ref_name }}" | |
| $VERSION = $TAG -replace '^v', '' | |
| $EXE = "src-tauri/target/release/omniget.exe" | |
| $DEST = "omniget_${VERSION}_x64-portable.exe" | |
| if (Test-Path $EXE) { | |
| Copy-Item $EXE $DEST | |
| gh release upload $TAG $DEST --repo ${{ github.repository }} --clobber | |
| } | |
| shell: pwsh | |
| package-chrome-extension: | |
| needs: publish-tauri | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| - name: Package Chrome extension | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| VERSION="${TAG#v}" | |
| OUTPUT="omniget-chrome-extension-v${VERSION}.zip" | |
| node browser-extension/chrome/scripts/package.mjs --version "$VERSION" --output "$OUTPUT" | |
| gh release upload "$TAG" "$OUTPUT" --repo "${{ github.repository }}" --clobber | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| upload-updater-json: | |
| needs: publish-tauri | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Generate and upload latest.json | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -euo pipefail | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| VERSION="${TAG#v}" | |
| REPO="${GITHUB_REPOSITORY}" | |
| PUB_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | |
| JSON=$(jq -n \ | |
| --arg v "$VERSION" \ | |
| --arg d "$PUB_DATE" \ | |
| '{version: $v, notes: "", pub_date: $d, platforms: {}}') | |
| declare -A PLATFORM_MAP=( | |
| ["aarch64.app.tar.gz.sig"]="darwin-aarch64" | |
| ["x64.app.tar.gz.sig"]="darwin-x86_64" | |
| ["amd64.AppImage.sig"]="linux-x86_64" | |
| ["aarch64.AppImage.sig"]="linux-aarch64" | |
| ["x64-setup.exe.sig"]="windows-x86_64" | |
| ) | |
| ASSETS="" | |
| for attempt in $(seq 1 10); do | |
| ASSETS=$(gh release view "$TAG" --repo "$REPO" --json assets -q '.assets[].name' || true) | |
| MISSING=0 | |
| for SUFFIX in "${!PLATFORM_MAP[@]}"; do | |
| if ! echo "$ASSETS" | grep -q "${SUFFIX}$"; then | |
| MISSING=$((MISSING + 1)) | |
| fi | |
| done | |
| if [ "$MISSING" -eq 0 ]; then | |
| echo "All expected .sig assets are visible (attempt $attempt)." | |
| break | |
| fi | |
| echo "Attempt $attempt: $MISSING .sig asset(s) not yet visible, retrying in 30s..." | |
| sleep 30 | |
| done | |
| TMPDIR=$(mktemp -d) | |
| for SUFFIX in "${!PLATFORM_MAP[@]}"; do | |
| PLATFORM="${PLATFORM_MAP[$SUFFIX]}" | |
| SIG_FILE=$(echo "$ASSETS" | grep "${SUFFIX}$" || true) | |
| if [ -n "$SIG_FILE" ]; then | |
| BUNDLE="${SIG_FILE%.sig}" | |
| DOWNLOADED=0 | |
| for dl_attempt in $(seq 1 10); do | |
| if gh release download "$TAG" --repo "$REPO" --pattern "$SIG_FILE" --dir "$TMPDIR" --clobber; then | |
| DOWNLOADED=1 | |
| break | |
| fi | |
| echo "Download attempt $dl_attempt for $SIG_FILE failed, retrying in 30s..." | |
| sleep 30 | |
| done | |
| if [ "$DOWNLOADED" -ne 1 ]; then | |
| echo "Failed to download $SIG_FILE after 10 attempts" >&2 | |
| exit 1 | |
| fi | |
| SIG_CONTENT=$(cat "$TMPDIR/$SIG_FILE") | |
| URL="https://github.com/${REPO}/releases/download/${TAG}/${BUNDLE}" | |
| JSON=$(echo "$JSON" | jq \ | |
| --arg p "$PLATFORM" \ | |
| --arg sig "$SIG_CONTENT" \ | |
| --arg url "$URL" \ | |
| '.platforms[$p] = {signature: $sig, url: $url}') | |
| fi | |
| done | |
| echo "$JSON" > latest.json | |
| echo "Generated latest.json:" | |
| cat latest.json | |
| gh release upload "$TAG" latest.json --repo "$REPO" --clobber | |
| rm -rf "$TMPDIR" |