-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
61f86d3
commit 499bfe3
Showing
61 changed files
with
19,767 additions
and
0 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,152 @@ | ||
name: Cross Compile Go Project | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
name: Build on ${{ matrix.os }} for ${{ matrix.goarch }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- os: linux | ||
goarch: amd64 | ||
- os: linux | ||
goarch: 386 | ||
- os: linux | ||
goarch: arm | ||
- os: linux | ||
goarch: arm64 | ||
- os: darwin | ||
goarch: amd64 | ||
- os: darwin | ||
goarch: arm64 | ||
- os: windows | ||
goarch: amd64 | ||
- os: windows | ||
goarch: 386 | ||
- os: android | ||
goarch: arm64 | ||
# ... Add other combinations as needed | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.21.1' # Set to specific Go version. | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20.9.0' # 使用最新的 LTS 版本 | ||
|
||
- name: Cache Node modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
frontend/node_modules | ||
~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install Quasar CLI and dependencies | ||
run: | | ||
cd frontend | ||
npm install -g @quasar/cli | ||
npm install | ||
- name: Build Quasar Project | ||
run: | | ||
cd frontend | ||
quasar build | ||
- name: Cache Android NDK | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
${{ github.workspace }}/android-ndk-r21e | ||
key: ${{ runner.os }}-android-ndk-r21e | ||
|
||
- name: Download and setup Android NDK | ||
if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'android' | ||
run: | | ||
sudo apt-get install -y wget unzip | ||
wget https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip -O ndk.zip | ||
unzip ndk.zip | ||
export ANDROID_NDK_HOME=$PWD/android-ndk-r21e | ||
echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV | ||
- name: Create output directory | ||
run: mkdir -p output | ||
|
||
- name: Compile Go for target | ||
env: | ||
GOOS: ${{ matrix.os }} | ||
GOARCH: ${{ matrix.goarch }} | ||
CGO_ENABLED: 0 | ||
run: | | ||
if [ "$GOOS" = "windows" ]; then | ||
go build -o output/gensokyo-${{ matrix.os }}-${{ matrix.goarch }}.exe | ||
else | ||
go build -o output/gensokyo-${{ matrix.os }}-${{ matrix.goarch }} | ||
fi | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: gensokyo-${{ matrix.os }}-${{ matrix.goarch }} | ||
path: output/gensokyo-${{ matrix.os }}-${{ matrix.goarch }}${{ endsWith(matrix.os, 'windows') && '.exe' || '' }} | ||
|
||
prepare_release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: output | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref_name }} | ||
release_name: Release ${{ github.ref_name }} | ||
draft: false | ||
|
||
- name: Upload Release Assets | ||
run: | | ||
for dir in output/*; do | ||
if [ -d "$dir" ]; then | ||
for file in "$dir"/*; do | ||
if [ -f "$file" ]; then | ||
asset_name=$(basename "$file") | ||
echo "Uploading ${asset_name}" | ||
GITHUB_UPLOAD_URL=${{ steps.create_release.outputs.upload_url }} | ||
GITHUB_UPLOAD_URL="${GITHUB_UPLOAD_URL%\{*}" | ||
GITHUB_UPLOAD_URL="${GITHUB_UPLOAD_URL%\?*}" | ||
curl \ | ||
-X POST \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Content-Type: application/octet-stream" \ | ||
--data-binary @"${file}" \ | ||
"${GITHUB_UPLOAD_URL}?name=${asset_name}&label=${asset_name}" | ||
else | ||
echo "Expected a file in ${dir}, but found something else." | ||
fi | ||
done | ||
else | ||
echo "Expected ${dir} to be a directory." | ||
fi | ||
done |
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,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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,9 @@ | ||
/dist | ||
/src-bex/www | ||
/src-capacitor | ||
/src-cordova | ||
/.quasar | ||
/node_modules | ||
.eslintrc.js | ||
babel.config.js | ||
/src-ssr |
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,87 @@ | ||
const { resolve } = require('path'); | ||
module.exports = { | ||
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy | ||
// This option interrupts the configuration hierarchy at this file | ||
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos) | ||
root: true, | ||
|
||
// https://eslint.vuejs.org/user-guide/#how-to-use-custom-parser | ||
// Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working | ||
// `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted | ||
parserOptions: { | ||
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#configuration | ||
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#eslint | ||
// Needed to make the parser take into account 'vue' files | ||
extraFileExtensions: ['.vue'], | ||
parser: '@typescript-eslint/parser', | ||
project: resolve(__dirname, './tsconfig.json'), | ||
tsconfigRootDir: __dirname, | ||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features | ||
sourceType: 'module' // Allows for the use of imports | ||
}, | ||
|
||
env: { | ||
browser: true | ||
}, | ||
|
||
// Rules order is important, please avoid shuffling them | ||
extends: [ | ||
// Base ESLint recommended rules | ||
// 'eslint:recommended', | ||
|
||
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage | ||
// ESLint typescript rules | ||
'plugin:@typescript-eslint/recommended', | ||
// consider disabling this class of rules if linting takes too long | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
|
||
// Uncomment any of the lines below to choose desired strictness, | ||
// but leave only one uncommented! | ||
// See https://eslint.vuejs.org/rules/#available-rules | ||
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention) | ||
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) | ||
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead) | ||
|
||
// https://github.com/prettier/eslint-config-prettier#installation | ||
// usage with Prettier, provided by 'eslint-config-prettier'. | ||
'prettier' | ||
], | ||
|
||
plugins: [ | ||
// required to apply rules which need type information | ||
'@typescript-eslint', | ||
|
||
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file | ||
// required to lint *.vue files | ||
'vue', | ||
|
||
// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674 | ||
// Prettier has not been included as plugin to avoid performance impact | ||
// add it as an extension for your IDE | ||
], | ||
|
||
globals: { | ||
ga: 'readonly', // Google Analytics | ||
cordova: 'readonly', | ||
__statics: 'readonly', | ||
__QUASAR_SSR__: 'readonly', | ||
__QUASAR_SSR_SERVER__: 'readonly', | ||
__QUASAR_SSR_CLIENT__: 'readonly', | ||
__QUASAR_SSR_PWA__: 'readonly', | ||
process: 'readonly', | ||
Capacitor: 'readonly', | ||
chrome: 'readonly' | ||
}, | ||
|
||
// add your custom rules here | ||
rules: { | ||
'prefer-promise-reject-errors': 'off', | ||
|
||
// TypeScript | ||
quotes: ['warn', 'single', { avoidEscape: true }], | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
|
||
// allow debugger during development only | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' | ||
} | ||
} |
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 @@ | ||
.DS_Store | ||
.thumbs.db | ||
node_modules | ||
|
||
# Quasar core related directories | ||
.quasar | ||
/dist | ||
|
||
# Cordova related directories and files | ||
/src-cordova/node_modules | ||
/src-cordova/platforms | ||
/src-cordova/plugins | ||
/src-cordova/www | ||
|
||
# Capacitor related directories and files | ||
/src-capacitor/www | ||
/src-capacitor/node_modules | ||
|
||
# BEX related directories and files | ||
/src-bex/www | ||
/src-bex/js/core | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
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,8 @@ | ||
// https://github.com/michael-ciniawsky/postcss-load-config | ||
|
||
module.exports = { | ||
plugins: [ | ||
// to edit target browsers: use "browserslist" field in package.json | ||
require('autoprefixer') | ||
] | ||
} |
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,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"semi": true | ||
} |
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,16 @@ | ||
{ | ||
// 使用 IntelliSense 了解相关属性。 | ||
// 悬停以查看现有属性的描述。 | ||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch localhost", | ||
"type": "firefox", | ||
"request": "launch", | ||
"reAttach": true, | ||
"url": "http://localhost:8080/", | ||
"webRoot": "${workspaceFolder}", | ||
} | ||
] | ||
} |
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,13 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"vue" | ||
], | ||
"browse-lite.startUrl": "http://127.0.0.1:8080", | ||
"cSpell.words": [ | ||
"apexcharts" | ||
], | ||
} |
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,26 @@ | ||
# NoneBot Plugin Go-CQHTTP (nonebot-plugin-gocqhttp-frontend) | ||
|
||
A plugin to run go-cqhttp directly in NoneBot2, without additional download and installation. | ||
|
||
## Install the dependencies | ||
```bash | ||
yarn | ||
``` | ||
|
||
### Start the app in development mode (hot-code reloading, error reporting, etc.) | ||
```bash | ||
quasar dev | ||
``` | ||
|
||
### Lint the files | ||
```bash | ||
yarn run lint | ||
``` | ||
|
||
### Build the app for production | ||
```bash | ||
quasar build | ||
``` | ||
|
||
### Customize the configuration | ||
See [Configuring quasar.conf.js](https://quasar.dev/quasar-cli/quasar-conf-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,15 @@ | ||
/* eslint-env node */ | ||
|
||
module.exports = api => { | ||
return { | ||
presets: [ | ||
[ | ||
'@quasar/babel-preset-app', | ||
api.caller(caller => caller && caller.target === 'node') | ||
? { targets: { node: 'current' } } | ||
: {} | ||
] | ||
] | ||
} | ||
} | ||
|
Oops, something went wrong.