Merge pull request #23 from cjpais/test-build

CI/CD Releases
This commit is contained in:
CJ Pais 2025-06-25 18:47:08 -07:00 committed by GitHub
commit 51197ab3b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 48 additions and 17 deletions

View file

@ -1,2 +1 @@
[build]
rustc-wrapper = "sccache"

View file

@ -1,11 +1,16 @@
name: "test-on-pr"
name: "Release"
on: [pull_request]
# This workflow will build your tauri app without uploading it anywhere.
on:
workflow_dispatch
# on:
# push:
# branches:
# - "test-build"
jobs:
test-tauri:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@ -23,10 +28,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: oven-sh/setup-bun@v2
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
@ -38,14 +40,33 @@ jobs:
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev libopenblas-dev libx11-dev libxtst-dev libxrandr-dev
- name: Install Vulkan SDK
if: matrix.platform == 'windows-latest' # This must match the platform value defined above.
uses: humbletim/install-vulkan-sdk@v1.2
with:
version: 1.4.309.0
cache: true
- name: Install trusted-signing-cli
if: matrix.platform == 'windows-latest' # This must match the platform value defined above.
run: cargo install trusted-signing-cli
- 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: matrix.platform == 'ubuntu-22.04'
- name: install frontend dependencies
run: yarn install # change this to npm, pnpm or bun depending on which one you use.
run: bun install # change this to npm, pnpm or bun depending on which one you use.
- name: import Apple Developer Certificate
if: matrix.platform == 'macos-latest'
# Prevents keychain from locking automatically for 3600 seconds.
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
@ -62,6 +83,7 @@ jobs:
security find-identity -v -p codesigning build.keychain
- name: verify certificate
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}')
@ -69,7 +91,8 @@ jobs:
echo "Certificate imported."
# If tagName and releaseId are omitted tauri-action will only build the app and won't try to upload any assets.
- uses: tauri-apps/tauri-action@v0
- name: Build
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
@ -79,5 +102,11 @@ jobs:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
with:
tagName: v__VERSION__
releaseName: "v__VERSION__"
args: ${{ matrix.args }}
prerelease: true

View file

@ -2,7 +2,7 @@
"$schema": "https://schema.tauri.app/config/2",
"productName": "Handy",
"version": "0.1.0",
"identifier": "com.handy.app",
"identifier": "com.pais.handy",
"build": {
"beforeDevCommand": "bun run dev",
"devUrl": "http://localhost:1420",
@ -50,6 +50,9 @@
"type": "none"
}
}
},
"windows": {
"signCommand": "trusted-signing-cli -e https://eus.codesigning.azure.net/ -a CJ-Signing -c cjpais-dev -d Handy %1"
}
}
}
}