Skip to content

Commit 0252f46

Browse files
committed
Init v0.1.0
1 parent 0e184b1 commit 0252f46

28 files changed

+6748
-2
lines changed

.github/workflows/build.yml

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
name: Build and Release Tauri App
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
check-version-and-tag:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v3
14+
15+
- name: Get Version from package.json
16+
id: get_version
17+
run: |
18+
version="v$(jq -r '.version' package.json)"
19+
echo "::set-output name=version::$version"
20+
21+
- name: Check if Tag Exists
22+
id: check_tag
23+
run: |
24+
version="${{ steps.get_version.outputs.version }}"
25+
if git rev-parse "$version" >/dev/null 2>&1; then
26+
echo "Tag $version already exists."
27+
echo "::set-output name=tag_exists::true"
28+
else
29+
echo "Tag $version does not exist."
30+
echo "::set-output name=tag_exists::false"
31+
fi
32+
33+
- name: Create Tag
34+
if: steps.check_tag.outputs.tag_exists == 'false'
35+
run: |
36+
version="${{ steps.get_version.outputs.version }}"
37+
git config user.name "github-actions"
38+
git config user.email "[email protected]"
39+
git tag -a "$version" -m "Release version $version"
40+
git push origin "$version"
41+
42+
build:
43+
needs: check-version-and-tag
44+
runs-on: ${{ matrix.os }}
45+
strategy:
46+
matrix:
47+
os: [macos-latest, windows-latest, ubuntu-22.04]
48+
steps:
49+
- name: Checkout Code
50+
uses: actions/checkout@v3
51+
52+
- name: Debug the runner OS
53+
run: echo "Running on ${{ runner.os }}"
54+
55+
- name: Setup Rust
56+
uses: actions-rs/toolchain@v1
57+
with:
58+
profile: minimal
59+
toolchain: stable
60+
override: true
61+
62+
- name: Setup Node.js
63+
uses: actions/setup-node@v3
64+
with:
65+
node-version: 18
66+
67+
- name: Install Dependencies
68+
run: |
69+
npm install
70+
npm install tailwindcss-animate
71+
72+
- name: Run npm audit
73+
run: npm audit --audit-level=high
74+
75+
- name: Install GTK and Build Tools (Ubuntu only)
76+
if: runner.os == 'Linux'
77+
run: |
78+
sudo apt-get update
79+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libudev-dev build-essential pkg-config
80+
81+
- name: Install Tauri CLI (locally)
82+
run: npm install @tauri-apps/cli
83+
84+
- name: Clean npm cache
85+
run: npm cache clean --force
86+
87+
- name: Build Tauri App
88+
run: npx tauri build
89+
90+
# Upload platform-specific artifacts
91+
- name: Upload Artifact for macOS
92+
if: runner.os == 'macOS'
93+
uses: actions/upload-artifact@v3
94+
with:
95+
name: tauri-app-macos
96+
path: src-tauri/target/release/bundle/dmg/*.dmg
97+
98+
- name: Upload Artifact for Windows
99+
if: runner.os == 'Windows'
100+
uses: actions/upload-artifact@v3
101+
with:
102+
name: tauri-app-windows
103+
path: src-tauri/target/release/bundle/msi/*.msi
104+
105+
- name: Upload Artifact for Linux (deb)
106+
if: runner.os == 'Linux'
107+
uses: actions/upload-artifact@v3
108+
with:
109+
name: tauri-app-linux-deb
110+
path: src-tauri/target/release/bundle/deb/*.deb
111+
112+
- name: Upload Artifact for Linux (rpm)
113+
if: runner.os == 'Linux'
114+
uses: actions/upload-artifact@v3
115+
with:
116+
name: tauri-app-linux-rpm
117+
path: src-tauri/target/release/bundle/rpm
118+
119+
release:
120+
needs: [build, check-version-and-tag]
121+
runs-on: ubuntu-latest
122+
steps:
123+
- name: Checkout Code
124+
uses: actions/checkout@v3
125+
126+
- name: Fetch All Tags
127+
run: git fetch --tags
128+
129+
- name: Verify Created Tag
130+
id: verified_version
131+
run: |
132+
version="v$(jq -r '.version' package.json)"
133+
echo "::set-output name=version::$version"
134+
echo "Verifying tag $version"
135+
if ! git tag -l | grep -q "$version"; then
136+
echo "Error: Tag $version not found locally."
137+
exit 1
138+
fi
139+
140+
# Download platform-specific artifacts
141+
- name: Download macOS Artifact
142+
uses: actions/download-artifact@v3
143+
with:
144+
name: tauri-app-macos
145+
path: src-tauri/target/release/bundle/dmg
146+
147+
- name: Download Windows Artifact
148+
uses: actions/download-artifact@v3
149+
with:
150+
name: tauri-app-windows
151+
path: src-tauri/target/release/bundle/msi
152+
153+
- name: Download Linux Artifact (deb)
154+
uses: actions/download-artifact@v3
155+
with:
156+
name: tauri-app-linux-deb
157+
path: src-tauri/target/release/bundle/deb
158+
159+
- name: Download Linux Artifact (rpm)
160+
uses: actions/download-artifact@v3
161+
with:
162+
name: tauri-app-linux-rpm
163+
path: src-tauri/target/release/bundle/rpm
164+
165+
# Create GitHub Release with only artifacts
166+
- name: Create Release
167+
uses: softprops/action-gh-release@v1
168+
with:
169+
tag_name: "${{ steps.verified_version.outputs.version }}"
170+
files: |
171+
src-tauri/target/release/bundle/dmg/*.dmg
172+
src-tauri/target/release/bundle/msi/*.msi
173+
src-tauri/target/release/bundle/deb/*.deb
174+
src-tauri/target/release/bundle/rpm/*.rpm
175+
draft: false
176+
env:
177+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@ Cargo.lock
1818
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
1919
# and can be added to the global gitignore or merged into this file. For a more nuclear
2020
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
21-
#.idea/
21+
#.idea/
22+
23+
# Do not upload nodeJS files
24+
node_modules
25+
.next
26+
OSEM-LSL-app

README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
# OSEM-LSL-Connector
1+
# OSEM LSL Connector
2+
23
Rust based LSL connector for device running OSEM Device Firmware.
4+
5+
![OSEM LSL Connector](app.png)
6+
7+
Note: By default it runs at 2000sps
8+
9+
## Build instructions
10+
11+
1. `npm i`
12+
2. `cargo tauri build`

app.png

26.7 KB
Loading

eslint.config.mjs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [
13+
...compat.extends("next/core-web-vitals", "next/typescript"),
14+
];
15+
16+
export default eslintConfig;

next-env.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

next.config.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
reactStrictMode: true,
4+
images: {
5+
unoptimized: true,
6+
remotePatterns: [
7+
{
8+
protocol: "https",
9+
hostname: "**",
10+
},
11+
],
12+
},
13+
output: "export",
14+
};
15+
/* module.exports = nextConfig*/
16+
export default nextConfig;

0 commit comments

Comments
 (0)