mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-03-22 10:41:48 +00:00
114 lines
4.1 KiB
YAML
114 lines
4.1 KiB
YAML
name: Tauri
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
release_tag:
|
|
required: false
|
|
type: string
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
# For saving to release
|
|
contents: write
|
|
id-token: write
|
|
|
|
env:
|
|
# mark:automatic-version
|
|
VERSION: "1.0.0"
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: ./rust/gui-client
|
|
|
|
jobs:
|
|
build-gui:
|
|
name: build-gui-${{ matrix.runs-on }}
|
|
runs-on: ${{ matrix.runs-on }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runs-on: ubuntu-20.04
|
|
binary-dest-path: firezone-linux-gui-client
|
|
rename-script: ../../scripts/build/tauri-rename-ubuntu.sh
|
|
upload-script: ../../scripts/build/tauri-upload-ubuntu.sh
|
|
exe-artifact: rust/gui-client/firezone-linux-gui-client-amd64
|
|
syms-artifact: rust/gui-client/firezone-linux-gui-client-amd64.dwp
|
|
pkg-artifact: rust/gui-client/firezone-linux-gui-client_amd64.deb
|
|
- runs-on: windows-2019
|
|
binary-dest-path: firezone-windows-client
|
|
rename-script: ../../scripts/build/tauri-rename-windows.sh
|
|
upload-script: ../../scripts/build/tauri-upload-windows.sh
|
|
exe-artifact: rust/gui-client/firezone-windows-client-x64.exe
|
|
syms-artifact: rust/gui-client/firezone-windows-client-x64.pdb
|
|
pkg-artifact: rust/gui-client/firezone-windows-client-x64.msi
|
|
env:
|
|
BINARY_DEST_PATH: ${{ matrix.binary-dest-path }}
|
|
CONNLIB_LOG_UPLOAD_INTERVAL_SECS: 300
|
|
AZURE_KEY_VAULT_URI: ${{ secrets.AZURE_KEY_VAULT_URI }}
|
|
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
|
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
|
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
|
AZURE_CERT_NAME: ${{ secrets.AZURE_CERT_NAME }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup-node
|
|
- uses: ./.github/actions/setup-rust
|
|
with:
|
|
cache_backend: "github"
|
|
# Cache needs to be scoped per OS version
|
|
key: ${{ matrix.runs-on }}-${{ runner.arch }}
|
|
- uses: ./.github/actions/setup-tauri
|
|
- name: Install pnpm deps
|
|
run: pnpm install
|
|
- name: Install AzureSignTool
|
|
if: ${{ runner.os == 'Windows' }}
|
|
shell: bash
|
|
# AzureSignTool >= 5 needs .NET 8. windows-2019 runner only has .NET 7.
|
|
run: dotnet tool install --global AzureSignTool --version 4.0.1
|
|
- name: Build release exe and MSI / deb
|
|
# Signs the exe before bundling it into the MSI
|
|
run: pnpm build
|
|
# We need to sign the exe inside the MSI. Currently
|
|
# we do this in a "beforeBundleCommand" hook in tauri.windows.conf.json.
|
|
# But this will soon be natively supported in Tauri.
|
|
# TODO: Use Tauri's native MSI signing with support for EV certs
|
|
# See https://github.com/tauri-apps/tauri/pull/8718
|
|
- name: Sign the MSI
|
|
if: ${{ runner.os == 'Windows' }}
|
|
shell: bash
|
|
run: ../../scripts/build/sign.sh ../target/release/bundle/msi/Firezone_${{ env.VERSION }}_x64_en-US.msi
|
|
- name: Rename artifacts and compute SHA256
|
|
shell: bash
|
|
run: ${{ matrix.rename-script }}
|
|
- name: Upload exe
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.binary-dest-path }}-exe
|
|
path: |
|
|
${{ matrix.exe-artifact }}
|
|
if-no-files-found: error
|
|
- name: Upload debug symbols
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.binary-dest-path }}-syms
|
|
path: |
|
|
${{ matrix.syms-artifact }}
|
|
if-no-files-found: error
|
|
- name: Upload package
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.binary-dest-path }}-pkg
|
|
path: |
|
|
${{ matrix.pkg-artifact }}
|
|
if-no-files-found: error
|
|
- name: Upload Release Assets
|
|
# Only upload the windows build to the drafted release on main builds
|
|
if: ${{ github.ref_name == 'main' }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
REPOSITORY: ${{ github.repository }}
|
|
TAG_NAME: ${{ env.VERSION }}
|
|
shell: bash
|
|
run: ${{ matrix.upload-script }}
|