Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions .github/workflows/application-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: application-release step

on:
workflow_run:
workflows: ["code coverage"]
types:
- completed

permissions:
contents: write

jobs:
# Auto tagging for release version
tag:
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # gives it full history of commits to find the last tag

- name: Auto-increment Tag
id: tag_version
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-and-release:
needs: tag
runs-on: ${{ matrix.platform }}
strategy: # This is for building the tauri app to work on mac, linux, and windows
fail-fast: false
matrix:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
rust_target: 'aarch64-apple-darwin'
go_binary_ext: ''
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
rust_target: 'x86_64-apple-darwin'
go_binary_ext: ''
- platform: 'ubuntu-24.04' # for linux ubuntu
args: ''
rust_target: 'x86_64-unknown-linux-gnu'
go_binary_ext: ''
- platform: 'windows-latest'
args: ''
rust_target: 'x86_64-pc-windows-msvc'
go_binary_ext: '.exe'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v5
with:
node-version: '>=23.6.1'

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: install frontend dependencies
run: npm install
working-directory: frontend

- name: Build Frontend
run: npm run build
working-directory: frontend

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24.0"

- name: Build Go backend client
run: go build -o ../frontend/src-tauri/binaries/backend-client-${{ matrix.rust_target }}${{ matrix.go_binary_ext }} ./cmd/main.go
working-directory: backend/client

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ${{ matrix.args }}
projectPath: frontend

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: ${{ github.workspace }}/CHANGELOG.txt
tag_name: ${{ needs.tag.outputs.new_tag }}
name: Release ${{ needs.tag.outputs.new_tag }}
files: |
frontend/src-tauri/target/**/release/bundle/nsis/*.exe
frontend/src-tauri/target/**/release/bundle/dmg/*.dmg
frontend/src-tauri/target/**/release/bundle/macos/*.app
frontend/src-tauri/target/**/release/bundle/deb/*.deb
frontend/src-tauri/target/**/release/bundle/appimage/*.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 1 addition & 7 deletions backend/client/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"os/signal"
"syscall"

"github.com/joho/godotenv"
"github.com/kelseyhightower/envconfig"
at "mosaic-client.com/gen/audio_transcription"
cb "mosaic-client.com/gen/conversation_briefing"
Expand Down Expand Up @@ -91,14 +90,9 @@ func websocketServer(

// method to load config values
func loadConfig() (*Config, error) {
err := godotenv.Load(".env")
if err != nil {
return nil, err
}

var cfg Config

err = envconfig.Process("", &cfg)
err := envconfig.Process("", &cfg)
if err != nil {
return nil, err
}
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"tauri:dev:ubuntu": "env -u GTK_PATH -u GTK_EXE_PREFIX -u GIO_MODULE_DIR -u GSETTINGS_SCHEMA_DIR -u GTK_IM_MODULE_FILE -u LOCPATH tauri dev",
"preview": "vite preview",
"tauri": "tauri",
"tauri:build": "tauri build",
"lint": "eslint .",
"test": "vitest",
"test:ui": "vitest --ui",
Expand Down
73 changes: 73 additions & 0 deletions frontend/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ tauri = { version = "2", features = [] }
tauri-plugin-opener = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tauri-plugin-shell = "2"

4 changes: 3 additions & 1 deletion frontend/src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"core:window:allow-current-monitor",
"core:window:allow-destroy",
"core:window:allow-set-size",
"opener:default"
"opener:default",
"shell:allow-execute",
"shell:allow-kill"
]
}
Loading
Loading