Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tauri Migration from V1 -> V2 and functional android build #9

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 7 additions & 8 deletions .eslintignore
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up on our discussion here #1 (comment)

I’ve confirmed that the issue still persists on this branch. Here is a video showing how changing just one character in the hash (such as a mistake) disrupts the entire process, with no feedback to the user indicating that the ticket hash is invalid.

FinalistFinal.mp4

A better user experience would be to display a message as soon as the user enters an invalid hash, letting them know it’s not valid.

Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
.env*
build
target
package
.vscode
.DS_Store
.svelte-kit
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
yarn.lock
2 changes: 2 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module.exports = {
'plugin:svelte/recommended',
'prettier'
],
files: ['**/*.{js,mjs,cjs,ts}'],
languageOptions: { globals: globals.browser },
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
Expand Down
84 changes: 53 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ name: Build
env:
CARGO_TERM_COLOR: always

on:
push:
branches:
- main
pull_request:
branches:
- main
on: [push]

jobs:
build-tauri:
Expand All @@ -20,10 +14,15 @@ jobs:
fail-fast: false
matrix:
settings:
- platform: 'macos-latest'
args: '--target universal-apple-darwin'
- platform: 'ubuntu-22.04'
args: ''
# TODO: maybe target specifically ARM based macs and Intel based macs to reduce built bundle size
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, create a ticket in Asana or GitHub. TODO comments always become stale.

# - platform: 'macos-latest' # for Arm based macs (M1 and above).
# args: '--target aarch64-apple-darwin'
# - platform: 'macos-latest' # for Intel based macs.
# args: '--target x86_64-apple-darwin'
- platform: 'macos-latest'
args: '--target universal-apple-darwin'
- platform: 'windows-latest'
args: ''

Expand All @@ -33,30 +32,29 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: install dependencies (ubuntu only)
- name: Install Dependencies (Ubuntu only)
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: setup node
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm' # Set this to npm, yarn or pnpm.
cache: 'npm'

- name: install Rust stable
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Rust cache
- name: Set up Rust Cache
uses: swatinem/rust-cache@v2

- name: install frontend dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: npm install # change this to npm or pnpm depending on which one you use.
- name: Install Node Dependencies
run: npm install

- uses: tauri-apps/tauri-action@v0
env:
Expand All @@ -67,30 +65,54 @@ jobs:
prerelease: false
args: ${{ matrix.settings.args }}

- name: Upload Windows Build
# Linux
- name: Upload Linux deb
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'windows-latest'
if: matrix.settings.platform == 'ubuntu-22.04'
with:
name: ark-drop-Windows.zip
path: ./target/release/bundle/
name: ark-drop-desktop_linux_deb
path: ./src-tauri/target/release/bundle/deb/*.deb

- name: Upload Linux AppImage
- name: Upload Linux rpm
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'ubuntu-22.04'
with:
name: ark-drop-desktop_linux_rpm
path: ./src-tauri/target/release/bundle/rpm/*.rpm

- name: Upload Linux AppImage
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'ubuntu-22.04'
with:
name: ark-drop.AppImage
path: ./target/release/bundle/appimage/ark-drop_*_amd64.AppImage
name: ark-drop-desktop_linux_appimage
path: ./src-tauri/target/release/bundle/appimage/*.AppImage

- name: Upload MacOS Build (ark-drop.app)
# MacOS
- name: Upload MacOS app
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'macos-latest'
with:
name: ark-drop-MacOS.zip
path: ./target/universal-apple-darwin/release/bundle/macos
name: ark-drop-desktop_macos_app
path: ./src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app

- name: Upload MacOS Build (ark-drop.dmg)
- name: Upload MacOS dmg
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'macos-latest'
with:
name: ark-drop-MacOS-dmg.zip
path: ./target/universal-apple-darwin/release/bundle/dmg
name: ark-drop-desktop_macos_dmg
path: ./src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg

# Windows
- name: Upload Windows msi
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'windows-latest'
with:
name: ark-drop-desktop_windows_msi
path: ./src-tauri/target/release/bundle/msi/*.msi

- name: Upload Windows exe
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'windows-latest'
with:
name: ark-drop-desktop_windows_exe
path: ./src-tauri/target/release/bundle/nsis/*.exe
22 changes: 10 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
.env*
build
target
package
.vscode
.DS_Store
.svelte-kit
node_modules
/build
target
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
/src-tauri/.ark-drop-data-*
target
.vscode

pnpm-lock.yaml
package-lock.json
yarn.lock
9 changes: 8 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Ignore files for PNPM, NPM and YARN
.env*
build
target
package
.vscode
.DS_Store
.svelte-kit
node_modules
pnpm-lock.yaml
package-lock.json
yarn.lock
9 changes: 3 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"useTabs": true,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": [
"prettier-plugin-svelte",
"prettier-plugin-tailwindcss"
],
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
}
Loading
Loading