Skip to content

Release

Release #12

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
release:
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-latest'
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
steps:
# 1. Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
# 2. Install Ubuntu dependencies
- name: Install dependencies (Ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libsoup-3.0-dev \
libjavascriptcoregtk-4.1-dev \
libssl-dev
# 3. Rust setup
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
# 4. Rust cache
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
# 5. Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
# 6. Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
# 7. Install dependencies
- name: Install dependencies
run: pnpm install
# 8. Build frontend
- name: Build frontend
run: pnpm build
# 9. Download yt-dlp binaries
- name: Download yt-dlp (macOS)
if: matrix.platform == 'macos-latest'
run: |
mkdir -p src-tauri/binaries
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos -o src-tauri/binaries/yt-dlp-universal-apple-darwin
chmod +x src-tauri/binaries/yt-dlp-universal-apple-darwin
# Copy for both architectures since it's a universal binary
cp src-tauri/binaries/yt-dlp-universal-apple-darwin src-tauri/binaries/yt-dlp-x86_64-apple-darwin
cp src-tauri/binaries/yt-dlp-universal-apple-darwin src-tauri/binaries/yt-dlp-aarch64-apple-darwin
rm src-tauri/binaries/yt-dlp-universal-apple-darwin
- name: Download yt-dlp (Windows)
if: matrix.platform == 'windows-latest'
run: |
mkdir -p src-tauri/binaries
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe -o src-tauri/binaries/yt-dlp-x86_64-pc-windows-msvc.exe
shell: bash
- name: Download yt-dlp (Linux)
if: matrix.platform == 'ubuntu-22.04'
run: |
mkdir -p src-tauri/binaries
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux -o src-tauri/binaries/yt-dlp-x86_64-unknown-linux-gnu
chmod +x src-tauri/binaries/yt-dlp-x86_64-unknown-linux-gnu
# 10. Build Tauri app and create release
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: 'get-down v__VERSION__'
releaseBody: 'See the assets to download and install this version.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}