Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoBernardino committed Apr 8, 2024
0 parents commit ce28254
Show file tree
Hide file tree
Showing 60 changed files with 11,077 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github: [BrunoBernardino]
custom:
[
'https://paypal.me/brunobernardino',
'https://gist.github.com/BrunoBernardino/ff5b54c13dd96ac7f9fee6fbfd825b09',
]
103 changes: 103 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Build Tauri

on:
workflow_dispatch:

push:
branches:
- "main"
- "feature/**"
- "fix/**"

jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-latest
arch: x86_64
rust_target: x86_64-unknown-linux-gnu
- os: macos-latest
arch: x86_64
rust_target: x86_64-apple-darwin
- os: macos-latest
arch: aarch64
rust_target: aarch64-apple-darwin
- os: windows-latest
arch: x86_64
rust_target: x86_64-pc-windows-msvc

runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: "Setup Rust"
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.config.rust_target }}

- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.config.rust_target }}

- name: Install webkit2gtk (ubuntu only)
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y webkit2gtk-4.0
- name: Install dependencies
run: |
npm i -g npm@10.1.0
make install
- name: Build
run: make build
env:
PL_SERVER_URL: ${{ secrets.PL_SERVER_URL }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}

- name: Archive AppImage
uses: actions/upload-artifact@v4
if: matrix.config.os == 'ubuntu-latest'
with:
name: bewcloud-sync-linux-${{ github.sha }}-unsigned.AppImage
path: src-tauri/target/debug/bundle/appimage/*.AppImage
if-no-files-found: error

- name: Archive deb
uses: actions/upload-artifact@v4
if: matrix.config.os == 'ubuntu-latest'
with:
name: bewcloud-sync-linux-${{ github.sha }}-unsigned.deb
path: src-tauri/target/debug/bundle/deb/*.deb
if-no-files-found: error

- name: Archive dmg
uses: actions/upload-artifact@v4
if: matrix.config.os == 'macos-latest'
with:
name: bewcloud-sync-macos-${{ matrix.config.arch }}-${{ github.sha }}-unsigned.dmg
path: src-tauri/target/debug/bundle/dmg/*.dmg
if-no-files-found: error

- name: Archive app
uses: actions/upload-artifact@v4
if: matrix.config.os == 'macos-latest'
with:
name: bewcloud-sync-macos-${{ matrix.config.arch }}-${{ github.sha }}-unsigned.app
path: src-tauri/target/debug/bundle/macos/*.app
if-no-files-found: error

- name: Archive msi
uses: actions/upload-artifact@v4
if: matrix.config.os == 'windows-latest'
with:
name: bewcloud-sync-windows-${{ github.sha }}-unsigned.msi
path: src-tauri/target/debug/bundle/msi/*.msi
if-no-files-found: error
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run Tests

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- uses: actions/cache@v4
with:
path: |
~/.npm
~/.nvm
node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: |
npm i -g npm@10.1.0
make install
- name: Run tests
run: make test
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.9.0
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
}
Loading

0 comments on commit ce28254

Please sign in to comment.