-
Notifications
You must be signed in to change notification settings - Fork 54
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
51 changed files
with
1,802 additions
and
12,476 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,132 @@ | ||
name: Publish New Release by Test Environment | ||
|
||
on: | ||
pull_request: | ||
branch: | ||
- 'test' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Read package.json | ||
id: package-version | ||
uses: tyankatsu0105/read-package-version-actions@v1 | ||
with: | ||
path: './' | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
with: | ||
tag_name: ${{ steps.package-version.outputs.version }} | ||
release_name: ${{ steps.package-version.outputs.version }} | ||
draft: false | ||
prerelease: false | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
version: ${{ steps.package-version.outputs.version }} | ||
|
||
|
||
build-mac: | ||
runs-on: macos-latest | ||
needs: release | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Build | ||
uses: actions/setup-node@master | ||
- run: npm cache clear --force | ||
- run: npm install yarn --legacy-peer-deps | ||
- run: yarn add ajv-formats | ||
- run: yarn install | ||
- run: yarn run release | ||
|
||
- name: Upload Release Asset For dmg | ||
uses: actions/upload-release-asset@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
with: | ||
upload_url: ${{ needs.release.outputs.upload_url }} | ||
asset_path: ./release/dbm-${{ needs.release.outputs.version }}-mac-x64.dmg | ||
asset_name: dbm-${{ needs.release.outputs.version }}-mac-x64.dmg | ||
asset_content_type: application/x-tg | ||
|
||
- name: Upload Release Asset For zip | ||
uses: actions/upload-release-asset@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
with: | ||
upload_url: ${{ needs.release.outputs.upload_url }} | ||
asset_path: ./release/dbm-${{ needs.release.outputs.version }}-mac-x64.zip | ||
asset_name: dbm-${{ needs.release.outputs.version }}-mac-x64.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload Release Asset For yml | ||
uses: actions/upload-release-asset@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
with: | ||
upload_url: ${{ needs.release.outputs.upload_url }} | ||
asset_path: ./release/latest-mac.yml | ||
asset_name: latest-mac-inter.yml | ||
asset_content_type: application/x-yaml | ||
|
||
- name: Download and upload to qiniu | ||
run: | | ||
wget https://devtools.qiniu.com/qshell-v2.6.2-darwin-amd64.tar.gz | ||
tar -xvzf qshell-v2.6.2-darwin-amd64.tar.gz | ||
# echo '--------- Start ---------' | ||
# ./qshell account ${{ env.TOKEN_AK }} ${{ env.TOKEN_SK }} | ||
# echo '--------- End ---------' | ||
./qshell account 5eua7TZfgnNb81gmVUBcw4x7PpQuy-v9v1iFyD1R zCwoByIkA9AnlK0qO0DGveH7dKDXLG3CRqZ2mlTW dbm_qiniu | ||
./qshell fput edurtio-other dbm/releases/darwin/x64/dbm-${{ needs.release.outputs.version }}-mac-x64.dmg ./release/dbm-${{ needs.release.outputs.version }}-mac-x64.dmg --overwrite | ||
./qshell fput edurtio-other dbm/releases/darwin/x64/dbm-${{ needs.release.outputs.version }}-mac-x64.zip ./release/dbm-${{ needs.release.outputs.version }}-mac-x64.zip --overwrite | ||
./qshell fput edurtio-other dbm/releases/darwin/x64/latest-mac.yml ./release/latest-mac.yml --overwrite | ||
build-win: | ||
runs-on: windows-latest | ||
needs: release | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Build | ||
uses: actions/setup-node@master | ||
- run: npm cache clear --force | ||
- run: npm install yarn --legacy-peer-deps | ||
- run: yarn add ajv-formats | ||
- run: yarn install | ||
- run: yarn run release | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
with: | ||
upload_url: ${{ needs.release.outputs.upload_url }} | ||
asset_path: ./release/dbm-${{ needs.release.outputs.version }}-windows-x64-nsis-installer.exe | ||
asset_name: dbm-${{ needs.release.outputs.version }}-windows-x64-nsis-installer.exe | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Download and upload to qiniu | ||
run: | | ||
wget https://devtools.qiniu.com/qshell-v2.6.2-linux-amd64.tar.gz | ||
tar -xvzf qshell-v2.6.2-linux-amd64.tar.gz | ||
# echo '--------- Start ---------' | ||
# ./qshell account ${{ env.TOKEN_AK }} ${{ env.TOKEN_SK }} | ||
# echo '--------- End ---------' | ||
./qshell account 5eua7TZfgnNb81gmVUBcw4x7PpQuy-v9v1iFyD1R zCwoByIkA9AnlK0qO0DGveH7dKDXLG3CRqZ2mlTW dbm_qiniu | ||
./qshell fput edurtio-other dbm/releases/windows/x64/dbm-${{ needs.release.outputs.version }}-windows-x64-nsis-installer.exe ./release/dbm-${{ needs.release.outputs.version }}-windows-x64-nsis-installer.exe | ||
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Test by push | ||
|
||
on: | ||
push | ||
|
||
jobs: | ||
build-mac: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Build | ||
uses: actions/setup-node@master | ||
- run: npm cache clear --force | ||
- run: npm install yarn --legacy-peer-deps | ||
- run: yarn add ajv-formats | ||
- run: yarn install | ||
- run: yarn run release | ||
|
||
build-win: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Build | ||
uses: actions/setup-node@master | ||
- run: npm cache clear --force | ||
- run: npm install yarn --legacy-peer-deps | ||
- run: yarn add ajv-formats | ||
- run: yarn install | ||
- run: yarn run release | ||
|
||
build-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Build | ||
uses: actions/setup-node@master | ||
- run: npm cache clear --force | ||
- run: npm install yarn --legacy-peer-deps | ||
- run: yarn add ajv-formats | ||
- run: yarn install | ||
- run: yarn run release |
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 |
---|---|---|
|
@@ -42,6 +42,7 @@ testem.log | |
/typings | ||
|
||
package-lock.json | ||
yarn.lock | ||
|
||
# e2e | ||
/e2e/*.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
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,125 @@ | ||
--- | ||
template: overrides/main.html | ||
--- | ||
|
||
This document describes how to contribute project documents to the repository | ||
|
||
#### The preparatory work | ||
|
||
--- | ||
|
||
- Start by [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the project source code into your own repository | ||
|
||
- Use the following command to clone the project source code locally | ||
|
||
```bash | ||
git clone https://github.com/<UserName>/dbm | ||
``` | ||
|
||
`UserName`: This is the GitHub username for the current Fork project, like mine **qianmoQ**,So the path is `github.com/qianmoQ/dbm` | ||
|
||
#### Install dependencies | ||
|
||
--- | ||
|
||
- Install the mkdocs tool | ||
|
||
```bash | ||
pip install mkdocs | ||
``` | ||
|
||
!!! warning "Warning" | ||
|
||
Some devices may require Python and PIP installed! | ||
|
||
- Go to the `docs` directory and install project dependencies | ||
|
||
```bash | ||
cd docs/ | ||
|
||
pip install -r requirements.txt | ||
``` | ||
|
||
#### Local debugging | ||
|
||
--- | ||
|
||
!!! info | ||
|
||
Documentation module local debugging is relatively simple. After completing the `install dependencies` section, start the local service using the following command | ||
|
||
```bash | ||
mkdocs serve | ||
``` | ||
|
||
After running the command, information similar to the following is displayed: | ||
|
||
```java | ||
INFO - Building documentation... | ||
INFO - The 'extra.alternate' configuration contains a 'link' option that should starts with './' in {'name': 'English', 'link': '/en/', 'lang': 'en'} | ||
INFO - The 'extra.alternate' configuration contains a 'link' option that should starts with './' in {'name': 'Chinese (Simplified)', 'link': '/zh/', | ||
'lang': 'zh'} | ||
WARNING - Language 'zh' is not supported by lunr.js, not setting it in the 'plugins.search.lang' option | ||
INFO - Cleaning site directory | ||
INFO - Translated navigation to en | ||
INFO - Translated navigation to zh | ||
INFO - Building en documentation | ||
INFO - Building zh documentation | ||
INFO - Documentation built in 1.71 seconds | ||
INFO - [14:17:46] Serving on http://127.0.0.1:8000/ | ||
``` | ||
|
||
This marks the successful startup of the service. Open the browser to `http://127.0.0.1:8000/` to see the local site that has been published | ||
|
||
#### contribute | ||
|
||
--- | ||
|
||
!!! tip | ||
|
||
We recommend that your cloned code rebuild a branch based on the master for code submission<br/> | ||
Build a new branch command `git checkout -b <BranchName>` | ||
|
||
- Document Contents | ||
|
||
`assets`: Resource files (images, files, etc.) | ||
|
||
`development`: Develop relevant documents | ||
|
||
`reference`: Software usage related documentation | ||
|
||
`release`: Release related documents | ||
|
||
- Modify the `mkdocs.yml` configuration file and add the configuration under the `nav` entry | ||
|
||
!!! tip | ||
|
||
For example, to contribute a test related document, the default file name is `test.md` and the file path is `docs/` | ||
|
||
The modified configuration is as follows | ||
|
||
```yaml | ||
nav: | ||
... | ||
- Test: docs/test.md | ||
``` | ||
- Internationalization name configuration (we'll use the Chinese example), add the configuration under the `nav_translations` entry | ||
|
||
```yaml | ||
nav_translations: | ||
zh: # What is marked here is the internationalization configuration of the relevant document | ||
Test: Test | ||
``` | ||
|
||
- Internationalization document | ||
|
||
!!! note | ||
|
||
Internationalization documents simply need to add the internationalization abbreviation to the original file, such as our default `test.md`,The internationalization file in Chinese is `test.zh.md` | ||
|
||
#### Submit code | ||
|
||
--- | ||
|
||
Once the document is written, we use the `git push` command to submit the written file to a personal repository, and then submit a `Pull request` to the `develop` branch of the remote repository for administrator review. The merge will be automatically posted to the official site |
Oops, something went wrong.