Skip to content

Commit

Permalink
merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
CtByte committed Jul 24, 2024
2 parents 82382f0 + 54c5747 commit fc4704e
Show file tree
Hide file tree
Showing 90 changed files with 4,940 additions and 4,001 deletions.
6 changes: 6 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
rustflags = ["-Zon-broken-pipe=kill"]

[env]
# Version number shown in CLI and system tray. Override this by setting the
# version number on build/run (i.e. `VERSION_NUMBER="1.0.0" pnpm dev`).
VERSION_NUMBER = "0.0.0"
38 changes: 29 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Build

on:
workflow_call:
inputs:
version-number:
type: string
pull_request:
types: [opened, synchronize, reopened]

Expand All @@ -19,22 +22,22 @@ jobs:
- platform: ubuntu-22.04
rust-targets: x86_64-unknown-linux-gnu
tauri-target: x86_64-unknown-linux-gnu
# 64-bit Windows
# 64-bit Windows (Intel & AMD)
- platform: windows-latest
rust-targets: x86_64-pc-windows-msvc
tauri-target: x86_64-pc-windows-msvc
# 32-bit Windows
# 64-bit Windows (ARM)
- platform: windows-latest
rust-targets: i686-pc-windows-msvc
tauri-target: i686-pc-windows-msvc
rust-targets: aarch64-pc-windows-msvc
tauri-target: aarch64-pc-windows-msvc

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
with:
version: 8
version: 9

- uses: actions/setup-node@v4
with:
Expand All @@ -48,20 +51,36 @@ jobs:

- uses: swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894
with:
workspaces: packages/desktop
shared-key: ${{ matrix.tauri-target }}-${{ hashFiles('packages/desktop/Cargo.lock') }}
shared-key: ${{ matrix.tauri-target }}-${{ hashFiles('Cargo.lock') }}

- name: Install dependencies (Ubuntu)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install dependencies (Windows)
if: matrix.platform == 'windows-latest'
run: |
dotnet tool install --global AzureSignTool --version 5.0.0
- run: pnpm i
- run: pnpm run --filter zebar --filter @zebar/client build

- uses: tauri-apps/tauri-action@v0
- name: Set version number
run: |
jq '.version="${{ inputs.version-number || '0.0.0' }}"' packages/desktop/tauri.conf.json
- name: Tauri build
uses: tauri-apps/tauri-action@v0
id: tauri
env:
AZ_VAULT_URL: ${{ secrets.AZ_VAULT_URL }}
AZ_CERT_NAME: ${{ secrets.AZ_CERT_NAME }}
AZ_CLIENT_ID: ${{ secrets.AZ_CLIENT_ID }}
AZ_CLIENT_SECRET: ${{ secrets.AZ_CLIENT_SECRET }}
AZ_TENANT_ID: ${{ secrets.AZ_TENANT_ID }}
RFC3161_TIMESTAMP_URL: ${{ vars.RFC3161_TIMESTAMP_URL }}
with:
projectPath: packages/desktop
args: --target ${{ matrix.tauri-target }}
Expand All @@ -75,7 +94,8 @@ jobs:
done
shell: bash

- uses: actions/upload-artifact@v4
- name: Upload bundle
uses: actions/upload-artifact@v4
with:
name: bundle-${{ matrix.tauri-target }}
if-no-files-found: error
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/lint-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

- uses: pnpm/action-setup@v2
with:
version: 8
version: 9

- uses: actions/setup-node@v4
with:
Expand All @@ -22,5 +22,7 @@ jobs:
toolchain: nightly
components: rustfmt

- uses: swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894

- run: pnpm i
- run: pnpm run lint
26 changes: 19 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@ concurrency:
group: release

jobs:
next-version:
uses: semantic-release-action/next-release-version/.github/workflows/next-release-version.yml@3c2d88ce0390012bac0b8383059a0b67d2594dc1

build:
needs: [next-version]
uses: ./.github/workflows/build.yaml
secrets: inherit
with:
version-number: ${{ needs.next-version.outputs.new-release-version }}

release:
needs: build
needs: [next-version, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -55,23 +62,28 @@ jobs:
[
{
"path": "tmp/bundle-x86_64-pc-windows-msvc/tauri.msi",
"name": "Zebar_x64_${nextRelease.gitTag}.msi"
"name": "zebar-${nextRelease.gitTag}-x64.msi",
"label": "${nextRelease.gitTag} Installer (Windows x64)"
},
{
"path": "tmp/bundle-i686-pc-windows-msvc/tauri.msi",
"name": "Zebar_x86_${nextRelease.gitTag}.msi"
"path": "tmp/bundle-aarch64-pc-windows-msvc/tauri.msi",
"name": "zebar-${nextRelease.gitTag}-arm64.msi",
"label": "${nextRelease.gitTag} Installer (Windows arm64)"
},
{
"path": "tmp/bundle-universal-apple-darwin/tauri.dmg",
"name": "Zebar_${nextRelease.gitTag}.dmg"
"name": "zebar-${nextRelease.gitTag}.dmg",
"label": "${nextRelease.gitTag} Installer (MacOS universal)"
},
{
"path": "tmp/bundle-x86_64-unknown-linux-gnu/tauri.deb",
"name": "Zebar_x64_${nextRelease.gitTag}.deb"
"name": "zebar-${nextRelease.gitTag}-x64.deb",
"label": "${nextRelease.gitTag} Installer (Linux .deb)"
},
{
"path": "tmp/bundle-x86_64-unknown-linux-gnu/tauri.AppImage",
"name": "Zebar_x64_${nextRelease.gitTag}.AppImage"
"name": "zebar-${nextRelease.gitTag}-x64.AppImage",
"label": "${nextRelease.gitTag} Installer (Linux AppImage)"
}
]
npm-publish: true
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pnpm-lock.yaml
packages/desktop/installer.wxs
installer.wxs
README.md
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

Loading

0 comments on commit fc4704e

Please sign in to comment.