chore(release): prepare v1.6.2 (#64) #12
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 Desktop Bundles | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| jobs: | |
| build-desktop: | |
| permissions: | |
| contents: read | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| artifact_name: nyro-desktop-linux-x86_64-bundle | |
| bundles: appimage | |
| rust_target: "" | |
| - os: ubuntu-24.04-arm | |
| artifact_name: nyro-desktop-linux-aarch64-bundle | |
| bundles: appimage | |
| rust_target: "" | |
| - os: macos-latest | |
| artifact_name: nyro-desktop-macos-aarch64-bundle | |
| bundles: app,dmg | |
| rust_target: "" | |
| arch_suffix: aarch64 | |
| - os: macos-15-intel | |
| artifact_name: nyro-desktop-macos-x86_64-bundle | |
| bundles: app,dmg | |
| rust_target: "" | |
| arch_suffix: x86_64 | |
| - os: windows-latest | |
| artifact_name: nyro-desktop-windows-x64-bundle | |
| bundles: nsis | |
| rust_target: "" | |
| - os: windows-11-arm | |
| artifact_name: nyro-desktop-windows-arm64-bundle | |
| bundles: nsis | |
| rust_target: "" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Add Rust target | |
| if: matrix.rust_target != '' | |
| run: rustup target add ${{ matrix.rust_target }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Install Linux desktop dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| xdg-utils \ | |
| libwebkit2gtk-4.1-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf | |
| - name: Install frontend dependencies | |
| run: pnpm -C webui install --frozen-lockfile | |
| - name: Install Tauri CLI | |
| run: cargo install tauri-cli --version "^2" --locked | |
| - name: Build desktop bundles | |
| run: | | |
| if [ -n "${{ matrix.rust_target }}" ]; then | |
| cargo tauri build --bundles ${{ matrix.bundles }} --target ${{ matrix.rust_target }} | |
| else | |
| cargo tauri build --bundles ${{ matrix.bundles }} | |
| fi | |
| shell: bash | |
| env: | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| - name: Rename macOS updater bundle with arch suffix | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| ARCH_SUFFIX="${{ matrix.arch_suffix }}" | |
| for f in target/release/bundle/macos/*.app.tar.gz; do | |
| [ -f "$f" ] || continue | |
| dir="$(dirname "$f")" | |
| base="$(basename "$f" .app.tar.gz)" | |
| mv "$f" "${dir}/${base}_${ARCH_SUFFIX}.app.tar.gz" | |
| [ -f "${f}.sig" ] && mv "${f}.sig" "${dir}/${base}_${ARCH_SUFFIX}.app.tar.gz.sig" | |
| done | |
| - name: Upload desktop bundle artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: target/**/release/bundle/** | |
| if-no-files-found: error | |
| publish-desktop: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-desktop | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download desktop artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| pattern: nyro-desktop-* | |
| merge-multiple: true | |
| - name: Collect release assets | |
| shell: bash | |
| run: | | |
| mkdir -p release-assets | |
| find artifacts -type f \( \ | |
| -name "*.dmg" -o -name "*.AppImage" \ | |
| -o -name "*-setup.exe" \ | |
| -o -name "*.app.tar.gz" -o -name "*.app.tar.gz.sig" \ | |
| -o -name "*.AppImage.sig" -o -name "*-setup.exe.sig" \ | |
| \) -exec cp -f {} release-assets/ \; | |
| - name: Generate latest.json | |
| env: | |
| VERSION: ${{ github.ref_name }} | |
| REPO: ${{ github.repository }} | |
| run: python3 scripts/release/gen_latest_json.py --assets-dir release-assets --output latest.json | |
| - name: Upload desktop release artifact pack | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nyro-desktop-release-pack | |
| path: | | |
| release-assets/** | |
| latest.json | |
| - name: Create or update GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true | |
| name: Nyro ${{ github.ref_name }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| artifacts: | | |
| release-assets/* | |
| latest.json | |
| replacesArtifacts: true | |
| makeLatest: legacy | |
| - name: Bump Homebrew Cask version | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| MAC_ARM_ASSET="release-assets/Nyro_${VERSION}_aarch64.dmg" | |
| MAC_INTEL_ASSET="release-assets/Nyro_${VERSION}_x64.dmg" | |
| LINUX_ARM_ASSET="release-assets/Nyro_${VERSION}_aarch64.AppImage" | |
| LINUX_INTEL_ASSET="release-assets/Nyro_${VERSION}_amd64.AppImage" | |
| for asset in "$MAC_ARM_ASSET" "$MAC_INTEL_ASSET" "$LINUX_ARM_ASSET" "$LINUX_INTEL_ASSET"; do | |
| [ -f "$asset" ] || { echo "missing release asset: $asset"; exit 1; } | |
| done | |
| MAC_ARM_SHA="$(sha256sum "$MAC_ARM_ASSET" | awk '{print $1}')" | |
| MAC_INTEL_SHA="$(sha256sum "$MAC_INTEL_ASSET" | awk '{print $1}')" | |
| LINUX_ARM_SHA="$(sha256sum "$LINUX_ARM_ASSET" | awk '{print $1}')" | |
| LINUX_INTEL_SHA="$(sha256sum "$LINUX_INTEL_ASSET" | awk '{print $1}')" | |
| git clone https://x-access-token:${GH_TOKEN}@github.com/nyroway/homebrew-nyro.git /tmp/homebrew-nyro | |
| cd /tmp/homebrew-nyro | |
| VERSION="$VERSION" \ | |
| MAC_ARM_SHA="$MAC_ARM_SHA" \ | |
| MAC_INTEL_SHA="$MAC_INTEL_SHA" \ | |
| LINUX_ARM_SHA="$LINUX_ARM_SHA" \ | |
| LINUX_INTEL_SHA="$LINUX_INTEL_SHA" \ | |
| perl -0777 -i -pe ' | |
| my $version = $ENV{"VERSION"}; | |
| my $mac_arm = $ENV{"MAC_ARM_SHA"}; | |
| my $mac_intel = $ENV{"MAC_INTEL_SHA"}; | |
| my $linux_arm = $ENV{"LINUX_ARM_SHA"}; | |
| my $linux_intel = $ENV{"LINUX_INTEL_SHA"}; | |
| s/version ".*?"/version "$version"/; | |
| s/^\s*sha256\s+:no_check\n//m; | |
| s/(on_macos do\n\s+arch arm: "aarch64", intel: "x64")(?:\n\s+sha256 arm:\s*"[^"]+",\n\s+intel:\s*"[^"]+")?/$1\n sha256 arm: "$mac_arm",\n intel: "$mac_intel"/s; | |
| s/(on_linux do\n\s+arch arm: "aarch64", intel: "amd64")(?:\n\s+sha256 arm:\s*"[^"]+",\n\s+intel:\s*"[^"]+")?/$1\n sha256 arm: "$linux_arm",\n intel: "$linux_intel"/s; | |
| ' Casks/nyro.rb | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Casks/nyro.rb | |
| git diff --cached --quiet && echo "No cask change" && exit 0 | |
| git commit -m "bump nyro to ${VERSION} with checksums" | |
| git push |