-
-
Notifications
You must be signed in to change notification settings - Fork 73
94 lines (82 loc) · 4.31 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Release
on:
workflow_dispatch:
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: "macos-latest" # for Arm based macs (M1 and above).
args: "--target aarch64-apple-darwin"
- platform: "macos-latest" # for Intel based macs.
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04" # Ubuntu 22.04 x86_64 (Works on 24.04 as well)
args: '--features "vulkan"'
pre-build-args: "--vulkan"
- platform: "windows-latest" # Windows x86_64
args: '--target x86_64-pc-windows-msvc --features "vulkan"'
pre-build-args: "--vulkan"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: setup Bun
uses: oven-sh/setup-bun@v1
- name: Rust cache
uses: swatinem/rust-cache@v2
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Install frontend dependencies
run: bun install
working-directory: ./desktop
- name: Prepare Vulkan SDK for Ubuntu 22.04
run: |
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list
sudo apt update
sudo apt install vulkan-sdk -y
sudo apt-get install -y mesa-vulkan-drivers
if: ${{ contains(matrix.platform, 'ubuntu-22.04') && contains(matrix.args, 'vulkan') }}
# Run pre build
- name: Run pre_build.js on ${{ matrix.platform }}
run: bun scripts/pre_build.js ${{ matrix.pre-build-args }}
- name: Import Windows certificate
if: matrix.platform == 'windows-latest'
env:
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
run: |
# Import certificate
[IO.File]::WriteAllBytes('cert.pfx', [Convert]::FromBase64String($env:WINDOWS_CERTIFICATE))
Import-PfxCertificate -Exportable -FilePath "cert.pfx" -CertStoreLocation 'cert:\CurrentUser\My' -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText)
# Sign resources
$signtoolPath = (Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\" -Filter "signtool.exe" -Recurse | Where-Object FullName -like "*\x64\signtool.exe" | Select-Object -First 1).FullName
&$signtoolPath sign /f cert.pfx /p 'Xypie50LRtyAHS' /tr http://timestamp.digicert.com /td sha256 /fd sha256 desktop\src-tauri\ffmpeg\bin\x64\*
- name: Build
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
tagName: v__VERSION__ # the action automatically replaces __VERSION__ with the app version.
releaseName: "v__VERSION__"
releaseBody: "What's new? 🎉📣"
prerelease: true
args: ${{ matrix.args }}
projectPath: "./desktop"
tauriScript: bunx tauri
update-landing:
runs-on: macos-latest
needs: publish-tauri
steps:
- uses: actions/checkout@v4
- name: Update landing URLs
run: gh workflow run landing.yml
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}