-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
21,743 additions
and
2,711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.github | ||
.webpack | ||
build | ||
src-tauri | ||
tmp | ||
|
||
*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module.exports = { | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
|
||
// plugins: ['@typescript-eslint'], | ||
rules: { | ||
// A temporary hack related to IDE not resolving correct package.json | ||
'import/no-extraneous-dependencies': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-filename-extension': 'off', | ||
'import/extensions': 'off', | ||
'import/no-unresolved': 'off', | ||
'import/no-import-module-exports': 'off', | ||
'no-shadow': 'off', | ||
'@typescript-eslint/no-shadow': 'off', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/no-extra-semi': 'off', | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
// project: './tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
createDefaultProgram: true, | ||
}, | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
--- | ||
name: Custom issue template | ||
about: Describe this issue template's purpose here. / 其他建设性意见与讨论 | ||
title: "[Other]" | ||
title: '[Other]' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,84 @@ | ||
name: 'publish' | ||
on: | ||
push: | ||
tags: [ v\d+\.\d+\.\d+ ] | ||
push: | ||
tags: [v\d+\.\d+\.\d+] | ||
|
||
jobs: | ||
publish-tauri: | ||
permissions: | ||
contents: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- target: aarch64-apple-darwin | ||
platform: macos-latest | ||
- target: x86_64-apple-darwin | ||
platform: macos-latest | ||
- target: x86_64-unknown-linux-gnu | ||
platform: ubuntu-20.04 | ||
- target: x86_64-pc-windows-msvc | ||
platform: windows-latest | ||
publish-tauri: | ||
permissions: | ||
contents: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- target: aarch64-apple-darwin | ||
platform: macos-latest | ||
- target: x86_64-apple-darwin | ||
platform: macos-latest | ||
- target: x86_64-unknown-linux-gnu | ||
platform: ubuntu-20.04 | ||
- target: x86_64-pc-windows-msvc | ||
platform: windows-latest | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get version | ||
id: get_version | ||
uses: battila7/get-version-action@v2 | ||
- name: Get version | ||
id: get_version | ||
uses: battila7/get-version-action@v2 | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: install Rust stable | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: install Rust stable | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Rust cache | ||
uses: swatinem/rust-cache@v2 | ||
with: | ||
workspaces: './src-tauri -> target' | ||
- name: Rust cache | ||
uses: swatinem/rust-cache@v2 | ||
with: | ||
workspaces: './src-tauri -> target' | ||
|
||
- name: install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-20.04' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libx11-dev libxdo-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||
- name: install dependencies (mac only) | ||
if: matrix.platform == 'macos-latest' | ||
run: | | ||
rustup target add aarch64-apple-darwin | ||
- uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
- name: install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-20.04' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libx11-dev libxdo-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||
- name: install dependencies (mac only) | ||
if: matrix.platform == 'macos-latest' | ||
run: | | ||
rustup target add aarch64-apple-darwin | ||
- uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: install frontend dependencies | ||
run: yarn install # change this to npm or pnpm depending on which one you use | ||
- name: install frontend dependencies | ||
run: yarn install # change this to npm or pnpm depending on which one you use | ||
|
||
- name: Change Version | ||
env: | ||
VERSION: "${{ steps.get_version.outputs.version-without-v }}" | ||
run: make change-version | ||
- name: Change Version | ||
env: | ||
VERSION: '${{ steps.get_version.outputs.version-without-v }}' | ||
run: make change-version | ||
|
||
- name: Build Tauri App | ||
uses: tauri-apps/tauri-action@dev | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} | ||
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | ||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | ||
with: | ||
tagName: Chatbox-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version | ||
releaseName: 'Chatbox v__VERSION__' | ||
releaseBody: 'See the assets to download this version and install.' | ||
releaseDraft: true | ||
prerelease: false | ||
args: --target ${{matrix.target}} | ||
- name: Build Tauri App | ||
uses: tauri-apps/tauri-action@dev | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} | ||
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | ||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | ||
with: | ||
tagName: Chatbox-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version | ||
releaseName: 'Chatbox v__VERSION__' | ||
releaseBody: 'See the assets to download this version and install.' | ||
releaseDraft: true | ||
prerelease: false | ||
args: --target ${{matrix.target}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.github | ||
.webpack | ||
build | ||
src-tauri | ||
tmp |
Oops, something went wrong.