204 lines
8.8 KiB
YAML
204 lines
8.8 KiB
YAML
name: 'release'
|
|
|
|
on:
|
|
workflow_dispatch
|
|
|
|
jobs:
|
|
release-tauri:
|
|
permissions:
|
|
contents: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- platform: 'macos-latest'
|
|
args: '--target aarch64-apple-darwin'
|
|
arch: 'silicon'
|
|
type: 'aarch64'
|
|
assetPattern: '[name]_[arch][ext]'
|
|
- platform: 'macos-latest'
|
|
args: '--target x86_64-apple-darwin'
|
|
arch: 'silicon'
|
|
type: 'x86_64'
|
|
assetPattern: '[name]_[arch][ext]'
|
|
- platform: 'ubuntu-22.04'
|
|
args: ''
|
|
assetPattern: '[name]_[arch][ext]'
|
|
variant: 'default'
|
|
- platform: 'ubuntu-22.04'
|
|
args: "--config '{\"bundle\":{\"createUpdaterArtifacts\":false}}'"
|
|
assetPattern: '[name]_[arch]_legacy[ext]'
|
|
variant: 'legacy'
|
|
- platform: 'ubuntu-22.04-arm'
|
|
args: ''
|
|
assetPattern: '[name]_[arch][ext]'
|
|
variant: 'default'
|
|
- platform: 'windows-11-arm'
|
|
args: '--target x86_64-pc-windows-msvc'
|
|
arch: 'arm64'
|
|
type: 'x86_64'
|
|
assetPattern: '[name]_[arch][ext]'
|
|
- platform: "windows-11-arm"
|
|
args: "--target aarch64-pc-windows-msvc"
|
|
arch: 'arm64'
|
|
type: 'aarch64'
|
|
assetPattern: '[name]_[arch][ext]'
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
env:
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: 'npm'
|
|
|
|
- name: install Rust stable (linux only)
|
|
uses: dtolnay/rust-toolchain@stable
|
|
if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-22.04-arm'
|
|
|
|
- name: install Rust stable (macos only)
|
|
uses: dtolnay/rust-toolchain@stable
|
|
if: matrix.platform == 'macos-latest'
|
|
with:
|
|
targets: ${{ matrix.type == 'aarch64' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}
|
|
|
|
- name: install Rust stable (windows only)
|
|
uses: dtolnay/rust-toolchain@stable
|
|
if: matrix.platform == 'windows-11-arm'
|
|
with:
|
|
targets: ${{ matrix.type == 'aarch64' && 'aarch64-pc-windows-msvc' || 'x86_64-pc-windows-msvc' }}
|
|
|
|
- name: Rust cache
|
|
uses: swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: './src-tauri -> target'
|
|
key: ${{ runner.os }}-${{ runner.arch }}${{ matrix.variant && format('-{0}', matrix.variant) || '' }}
|
|
|
|
- name: install dependencies (linux only)
|
|
if: matrix.variant == 'default'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
|
|
|
- name: install dependencies (linux legacy only)
|
|
if: matrix.variant == 'legacy'
|
|
run: |
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y \
|
|
build-essential \
|
|
curl \
|
|
wget \
|
|
file \
|
|
libgtk-3-dev \
|
|
libxdo-dev \
|
|
libssl-dev \
|
|
libappindicator3-dev \
|
|
librsvg2-dev \
|
|
patchelf
|
|
|
|
mkdir -p /tmp/ubuntu-packages
|
|
cd /tmp/ubuntu-packages
|
|
wget https://launchpadlibrarian.net/723972773/libwebkit2gtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb
|
|
wget https://launchpadlibrarian.net/723972761/libwebkit2gtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb
|
|
wget https://launchpadlibrarian.net/723972770/libjavascriptcoregtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb
|
|
wget https://launchpadlibrarian.net/723972746/libjavascriptcoregtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb
|
|
wget https://launchpadlibrarian.net/723972735/gir1.2-javascriptcoregtk-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb
|
|
wget https://launchpadlibrarian.net/723972739/gir1.2-webkit2-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb
|
|
wget https://launchpadlibrarian.net/606433947/libicu70_70.1-2ubuntu1_amd64.deb
|
|
wget https://launchpadlibrarian.net/606433941/libicu-dev_70.1-2ubuntu1_amd64.deb
|
|
wget https://launchpadlibrarian.net/606433945/icu-devtools_70.1-2ubuntu1_amd64.deb
|
|
wget https://launchpadlibrarian.net/595623693/libjpeg8_8c-2ubuntu10_amd64.deb
|
|
wget https://launchpadlibrarian.net/587202140/libjpeg-turbo8_2.1.2-0ubuntu1_amd64.deb
|
|
wget https://launchpadlibrarian.net/592959859/xdg-desktop-portal-gtk_1.14.0-1build1_amd64.deb
|
|
sudo apt-get install -y /tmp/ubuntu-packages/*.deb
|
|
|
|
- name: install dependencies (linux arm only)
|
|
if: matrix.platform == 'ubuntu-22.04-arm'
|
|
run: |
|
|
sudo apt-get install -y xdg-utils libayatana-appindicator3-dev
|
|
|
|
- name: install dependencies (windows only)
|
|
if: matrix.platform == 'windows-11-arm'
|
|
run: |
|
|
cargo install trusted-signing-cli
|
|
|
|
- name: Override linuxdeploy (linux only)
|
|
if: matrix.platform == 'ubuntu-22.04'
|
|
run: |
|
|
TAURI_TOOLKIT_PATH="${XDG_CACHE_HOME:-$HOME/.cache}/tauri"
|
|
mkdir -p "$TAURI_TOOLKIT_PATH"
|
|
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-x86_64.AppImage -O "$TAURI_TOOLKIT_PATH/linuxdeploy-x86_64.AppImage"
|
|
chmod +x "$TAURI_TOOLKIT_PATH/linuxdeploy-x86_64.AppImage"
|
|
|
|
- name: Override linuxdeploy (linux arm only)
|
|
if: matrix.platform == 'ubuntu-22.04-arm'
|
|
run: |
|
|
TAURI_TOOLKIT_PATH="${XDG_CACHE_HOME:-$HOME/.cache}/tauri"
|
|
mkdir -p "$TAURI_TOOLKIT_PATH"
|
|
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-aarch64.AppImage -O "$TAURI_TOOLKIT_PATH/linuxdeploy-aarch64.AppImage"
|
|
chmod +x "$TAURI_TOOLKIT_PATH/linuxdeploy-aarch64.AppImage"
|
|
|
|
- name: install frontend dependencies
|
|
run: npm install
|
|
|
|
- name: Import Apple Developer Certificate (macos only)
|
|
if: matrix.platform == 'macos-latest'
|
|
env:
|
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
run: |
|
|
echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12
|
|
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
|
security default-keychain -s build.keychain
|
|
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
|
security set-keychain-settings -t 3600 -u build.keychain
|
|
security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
|
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
|
|
security find-identity -v -p codesigning build.keychain
|
|
|
|
- name: Verify Certificate (macos only)
|
|
if: matrix.platform == 'macos-latest'
|
|
run: |
|
|
CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application")
|
|
CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}')
|
|
echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
|
|
echo "Certificate imported."
|
|
|
|
- uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# for windows signing
|
|
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
|
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
|
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
|
|
|
# for macos signing
|
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }}
|
|
|
|
# for macos notarization
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
APPLE_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
|
|
# for updates
|
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
|
with:
|
|
tagName: v__VERSION__
|
|
releaseName: 'v__VERSION__'
|
|
releaseBody: "<img width=\"1645\" height=\"626\" alt=\"Rclone UI\" src=\"https://github.com/user-attachments/assets/539c0b90-fee1-487e-879a-6a9168a44508\" />\n\n# Rclone UI v__VERSION__\n- Bug squashing & improvements.\n\n**See the assets to download this version and install.**"
|
|
assetNamePattern: ${{ matrix.assetPattern }}
|
|
releaseDraft: true
|
|
prerelease: false
|
|
args: ${{ matrix.args }}
|