Skip to content

Commit 51197ab

Browse files
authored
Merge pull request #23 from cjpais/test-build
CI/CD Releases
2 parents 863a83b + 0d10b51 commit 51197ab

File tree

3 files changed

+48
-17
lines changed

3 files changed

+48
-17
lines changed

.cargo/config.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
[build]
2-
rustc-wrapper = "sccache"
Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
name: "test-on-pr"
1+
name: "Release"
22

3-
on: [pull_request]
4-
5-
# This workflow will build your tauri app without uploading it anywhere.
3+
on:
4+
workflow_dispatch
5+
# on:
6+
# push:
7+
# branches:
8+
# - "test-build"
69

710
jobs:
8-
test-tauri:
11+
publish-tauri:
12+
permissions:
13+
contents: write
914
strategy:
1015
fail-fast: false
1116
matrix:
@@ -23,10 +28,7 @@ jobs:
2328
steps:
2429
- uses: actions/checkout@v4
2530

26-
- name: setup node
27-
uses: actions/setup-node@v4
28-
with:
29-
node-version: lts/*
31+
- uses: oven-sh/setup-bun@v2
3032

3133
- name: install Rust stable
3234
uses: dtolnay/rust-toolchain@stable
@@ -38,14 +40,33 @@ jobs:
3840
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
3941
run: |
4042
sudo apt-get update
41-
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
42-
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
43-
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
43+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev libopenblas-dev libx11-dev libxtst-dev libxrandr-dev
44+
45+
- name: Install Vulkan SDK
46+
if: matrix.platform == 'windows-latest' # This must match the platform value defined above.
47+
uses: humbletim/[email protected]
48+
with:
49+
version: 1.4.309.0
50+
cache: true
51+
52+
- name: Install trusted-signing-cli
53+
if: matrix.platform == 'windows-latest' # This must match the platform value defined above.
54+
run: cargo install trusted-signing-cli
55+
56+
- name: Prepare Vulkan SDK for Ubuntu 22.04
57+
run: |
58+
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
59+
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
60+
sudo apt update
61+
sudo apt install vulkan-sdk -y
62+
sudo apt-get install -y mesa-vulkan-drivers
63+
if: matrix.platform == 'ubuntu-22.04'
4464

4565
- name: install frontend dependencies
46-
run: yarn install # change this to npm, pnpm or bun depending on which one you use.
66+
run: bun install # change this to npm, pnpm or bun depending on which one you use.
4767

4868
- name: import Apple Developer Certificate
69+
if: matrix.platform == 'macos-latest'
4970
# Prevents keychain from locking automatically for 3600 seconds.
5071
env:
5172
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
@@ -62,14 +83,16 @@ jobs:
6283
security find-identity -v -p codesigning build.keychain
6384
6485
- name: verify certificate
86+
if: matrix.platform == 'macos-latest'
6587
run: |
6688
CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application")
6789
CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}')
6890
echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
6991
echo "Certificate imported."
7092
7193
# If tagName and releaseId are omitted tauri-action will only build the app and won't try to upload any assets.
72-
- uses: tauri-apps/tauri-action@v0
94+
- name: Build
95+
uses: tauri-apps/tauri-action@v0
7396
env:
7497
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7598
APPLE_ID: ${{ secrets.APPLE_ID }}
@@ -79,5 +102,11 @@ jobs:
79102
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
80103
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
81104
APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }}
105+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
106+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
107+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
82108
with:
109+
tagName: v__VERSION__
110+
releaseName: "v__VERSION__"
83111
args: ${{ matrix.args }}
112+
prerelease: true

src-tauri/tauri.conf.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Handy",
44
"version": "0.1.0",
5-
"identifier": "com.handy.app",
5+
"identifier": "com.pais.handy",
66
"build": {
77
"beforeDevCommand": "bun run dev",
88
"devUrl": "http://localhost:1420",
@@ -50,6 +50,9 @@
5050
"type": "none"
5151
}
5252
}
53+
},
54+
"windows": {
55+
"signCommand": "trusted-signing-cli -e https://eus.codesigning.azure.net/ -a CJ-Signing -c cjpais-dev -d Handy %1"
5356
}
5457
}
55-
}
58+
}

0 commit comments

Comments
 (0)