diff --git a/.changelog/v4.0.0-beta5.md b/.changelog/v4.0.0-beta5.md
new file mode 100644
index 00000000..a18f9fde
--- /dev/null
+++ b/.changelog/v4.0.0-beta5.md
@@ -0,0 +1,7 @@
+> 对应核心版本: [**v4.5.0**](https://github.com/simple-robot/simpler-robot/releases/tag/v4.5.0)
+
+> [!warning]
+> 目前版本尚处于 **`beta`** 阶段,代表仍然可能存在部分已知问题或未知问题,
+> 以及尚未完善的内容和落后于官方更新的内容。
+
+我们欢迎并期望着您的 [反馈](https://github.com/simple-robot/simbot-component-kook/issues) 或 [协助](https://github.com/simple-robot/simbot-component-kook/pulls),感谢您的贡献与支持!
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index db5047f9..c6486840 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,9 +1,9 @@
blank_issues_enabled: true
contact_links:
- - name: 问题反馈
+ - name: 统一反馈处
url: https://github.com/simple-robot/simpler-robot/issues/new/choose
- about: 通过simbot核心库issues统一反馈组件问题
+ about: 通过simbot核心仓库统一反馈问题
- name: 社区
url: https://github.com/orgs/simple-robot/discussions
diff --git a/.github/ISSUE_TEMPLATE/report.yml b/.github/ISSUE_TEMPLATE/report.yml
index 375eaac7..dcdcaa24 100644
--- a/.github/ISSUE_TEMPLATE/report.yml
+++ b/.github/ISSUE_TEMPLATE/report.yml
@@ -1,6 +1,5 @@
name: "🔥问题反馈"
-description: "反馈遇到的BUG或问题"
-labels: [ "bug?" ]
+description: "直接向本仓库反馈问题或提出一个贡献申请"
assignees: [ "ForteScarlet" ]
# https://docs.github.com/cn/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
body:
@@ -14,11 +13,34 @@ body:
+ - type: dropdown
+ id: will-contribute
+ attributes:
+ label: 是否会提供贡献?
+ description: 如果此条议题是你打算提供代码贡献作为前提,那么标记它,来告诉我们与其他开发者,以避免产生可能的重复劳动
+ options:
+ - 否
+ - 是
+ - 不确定
+ default: 0
+ validations:
+ required: true
+
+ - type: textarea
+ id: version
+ attributes:
+ label: 版本信息
+ description: 核心库、组件库、以及其他可能涉及到的依赖库的版本信息。
+ placeholder: |
+ 例如:
+ simbot-component-kook: va.b.c
+ simbot-core: v999
- type: dropdown
id: language
attributes:
- label: 使用的语言
+ label: 涉及的编程语言
+ description: 如果没有或无对应选项则选择'其他'后在后续描述中补充说明
options:
- Java
- Kotlin
@@ -29,7 +51,8 @@ body:
- type: dropdown
id: build-tool
attributes:
- label: 使用的构建工具
+ label: 项目构建工具
+ description: 如果没有或无对应选项则选择'其他'后在后续描述中补充说明
options:
- Maven
- Gradle
@@ -41,6 +64,6 @@ body:
id: description
attributes:
label: 内容描述
- description: 描述你的反馈内容
+ description: 描述你的反馈内容。(注意日志、代码等特殊内容格式,确保易于阅读)
validations:
required: true
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index ea7718bd..11ec9866 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -7,3 +7,6 @@ updates:
interval: weekly
labels:
- dependencies
+ assignees:
+ - ForteScarlet
+ open-pull-requests-limit: 10
diff --git a/.github/workflows/deploy-website-v4.yml b/.github/workflows/deploy-website-v4.yml
index f91a77db..7a9bc675 100644
--- a/.github/workflows/deploy-website-v4.yml
+++ b/.github/workflows/deploy-website-v4.yml
@@ -121,33 +121,3 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
-
- # https://www.jetbrains.com/help/writerside/configure-search.html
- publish-indexes:
- # Requires the build-job results
- needs: [build, test]
- runs-on: ubuntu-latest
- container:
- image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-2
-
- env:
-
- CONFIG_JSON_VERSION: ${{ fromJSON(needs.build.outputs.config_json).productVersion }}
-
- steps:
- - name: Download artifact
- uses: actions/download-artifact@v3
- with:
- name: algolia-indexes
-
- - name: Unzip artifact
- run: |
- unzip -O UTF-8 -qq ${{ env.ALGOLIA_ARTIFACT }} -d algolia-indexes
- env "algolia-key=${{secrets.ALGOLIA_KEY}}" java -jar /opt/builder/help-publication-agent.jar \
- update-index \
- --application-name ${{env.ALGOLIA_APP_NAME}} \
- --index-name ${{env.ALGOLIA_INDEX_NAME}} \
- --product ${{env.INSTANCE_NAME}} \
- --version ${{env.CONFIG_JSON_VERSION}} \
- --index-directory algolia-indexes/ \
- 2>&1 | tee algolia-update-index-log.txt
diff --git a/.github/workflows/deploy-website.yml.bk b/.github/workflows/deploy-website.yml.bk
deleted file mode 100644
index 4d0b8142..00000000
--- a/.github/workflows/deploy-website.yml.bk
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Deploy Website
-on:
- workflow_dispatch:
- push:
- branches:
- - main
- - dev/ver/**
- - dev/main
- paths:
- - 'website/**'
- tags-ignore:
- - 'v**'
-
-jobs:
- deploy-website:
- name: Deploy Website
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v3
- with:
- node-version: 16.x
- cache: npm
- cache-dependency-path: ./website/package-lock.json
-
- - run: |
- npm ci
- npm run build
- working-directory: ./website
-
- # https://github.com/marketplace/actions/github-pages-action
- - name: Push to doc repository
- uses: peaceiris/actions-gh-pages@v3
- with:
- personal_token: ${{ secrets.PUSH_TOKEN }}
- publish_branch: gh-pages
- publish_dir: ./website/build
-
diff --git a/.github/workflows/doc-test-branch.yml.bk b/.github/workflows/doc-test-branch.yml.bk
deleted file mode 100644
index bec2070e..00000000
--- a/.github/workflows/doc-test-branch.yml.bk
+++ /dev/null
@@ -1,28 +0,0 @@
-name: Test Doc Branch
-on:
- pull_request:
- branches:
- - 'dev/**'
- paths:
- - 'website/**'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
-
-jobs:
- deploy-website:
- name: Build Website
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v3
- with:
- node-version: 16.x
- cache: npm
- cache-dependency-path: ./website/package-lock.json
-
- - run: |
- npm ci
- npm run build
- working-directory: ./website
diff --git a/.github/workflows/publish-kdoc.yml b/.github/workflows/publish-kdoc.yml
new file mode 100644
index 00000000..e854b445
--- /dev/null
+++ b/.github/workflows/publish-kdoc.yml
@@ -0,0 +1,59 @@
+name: Publish KDoc
+on:
+ workflow_dispatch:
+
+
+env:
+ JAVA_VERSION: 21
+ JAVA_DISTRIBUTION: zulu
+ GRADLE_VERSION: 8.5
+ IS_CI: true
+ GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
+ GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
+ GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
+ SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
+ SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
+ GRADLE_OPTS: "-XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
+
+jobs:
+ deploy-doc:
+ name: Deploy-doc
+ runs-on: ubuntu-latest
+ steps:
+ # 检出仓库代码
+ - name: Check out repo
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+ fetch-depth: 0
+ # setup Java
+ - name: Setup java
+ uses: actions/setup-java@v4
+ with:
+ distribution: ${{ env.JAVA_DISTRIBUTION }}
+ java-version: ${{ env.JAVA_VERSION }}
+
+ # setup Gradle
+ - name: Gradle generate documentation
+ uses: gradle/actions/setup-gradle@v3
+ with:
+ gradle-version: ${{ env.GRADLE_VERSION }}
+ arguments: |
+ -Porg.gradle.jvmargs="-Xmx4g -Xms4g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
+ -Porg.gradle.daemon=false
+ --info
+ --warning-mode all
+ -x test
+ --build-cache
+ dokkaHtmlMultiModule
+
+ - name: Push to doc repository
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ personal_token: ${{ secrets.PUSH_TOKEN }}
+ external_repository: simple-robot-library/simbot3-api-docs
+ publish_branch: kdoc-deploy/component-kook
+ publish_dir: ./build/dokka/html
+ # deploy to sub dir
+ destination_dir: components/kook
+
diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml
index c1c02dad..87095493 100644
--- a/.github/workflows/publish-release.yml
+++ b/.github/workflows/publish-release.yml
@@ -9,6 +9,9 @@ concurrency:
group: publish-release-${{ github.ref_name }}
env:
+ JAVA_VERSION: 21
+ JAVA_DISTRIBUTION: zulu
+ GRADLE_VERSION: 8.5
IS_CI: true
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
@@ -18,45 +21,55 @@ env:
GRADLE_OPTS: "-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
jobs:
- run-test-and-publish:
- name: Run test and publish
+ run-test:
+ name: Run all tests for publish
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- # 检出仓库代码
- - name: Check Out Repo
- uses: actions/checkout@v4
-
- # setup Java
- - name: Setup Java
- uses: actions/setup-java@v4
+ - uses: actions/checkout@v4
+ - uses: actions/setup-java@v4
with:
- distribution: 'zulu'
- java-version: 21
+ distribution: ${{ env.JAVA_DISTRIBUTION }}
+ java-version: ${{ env.JAVA_VERSION }}
cache: 'gradle'
+ # setup Gradle
- name: Gradle Run Test
uses: gradle/actions/setup-gradle@v3
with:
- gradle-version: 8.5
-# arguments: clean assemble test
- arguments: assemble test -Porg.gradle.daemon=false
+ gradle-version: ${{ env.GRADLE_VERSION }}
+
+ - name: Run all tests
+ run: gradle assemble allTests --stacktrace --warning-mode all
- - name: Gradle Publish Release
+
+ publish-releases:
+ name: Publish releases
+ needs: run-test
+ # 交叉编译 support
+ # see https://kotlinlang.org/docs/multiplatform-publish-lib.html#host-requirements
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-java@v4
+ with:
+ distribution: ${{ env.JAVA_DISTRIBUTION }}
+ java-version: ${{ env.JAVA_VERSION }}
+ cache: 'gradle'
+ - name: Publish releases
uses: gradle/actions/setup-gradle@v3
with:
- gradle-version: 8.5
+ gradle-version: ${{ env.GRADLE_VERSION }}
arguments: |
publishToSonatype
closeAndReleaseStagingRepositories
- --info
+ --info
--warning-mode all
-x test
--build-cache
- -Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxPermSize=1g -Dfile.encoding=UTF-8"
- -Porg.gradle.daemon=false
+ -Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
env:
SIMBOT_IS_SNAPSHOT: false
@@ -65,7 +78,7 @@ jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
- needs: run-test-and-publish
+ needs: publish-releases
permissions:
contents: write
steps:
@@ -82,41 +95,10 @@ jobs:
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, 'preview') || contains(github.ref_name, 'alpha') || contains(github.ref_name, 'dev') }}
-# || contains(github.ref_name, 'beta')
-
- publish-snapshot:
- name: Publish snapshot
- strategy:
- matrix:
- os: [ macos-latest, windows-latest, ubuntu-latest ]
- runs-on: ${{ matrix.os }}
- needs: run-test-and-publish
- steps:
- # 检出仓库代码
- - name: Check out repo
- uses: actions/checkout@v4
-
- # setup Java
- - name: Setup java
- uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 21
-
- # setup Gradle
- - name: Gradle publish snapshot
- uses: gradle/actions/setup-gradle@v3
- with:
- gradle-version: 8.5
- arguments: clean test publishToSonatype closeAndReleaseStagingRepositories
- env:
- SIMBOT_IS_SNAPSHOT: true
- SIMBOT_SNAPSHOT_ONLY: true
-
deploy-doc:
name: Deploy-doc
runs-on: ubuntu-latest
- needs: run-test-and-publish
+ needs: publish-releases
steps:
# 检出仓库代码
- name: Check out repo
diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml
index 6812c8c7..f2709b91 100644
--- a/.github/workflows/publish-snapshot.yml
+++ b/.github/workflows/publish-snapshot.yml
@@ -3,24 +3,26 @@ on:
push:
branches:
- main
- - dev-snapshot**
- - v*.*.**
- - dev/main
- dev/ver/**
-
+ - dev/main
paths:
- - '**src/main/kotlin/**.kt'
- - '**src/main/java/**.java'
- - 'buildSrc/**'
- - '**.kts'
-
- tags-ignore:
- - 'v4**'
+ - 'buildSrc'
+ - '**src/**/kotlin/**.kt'
+ - '**src/**/java/**.java'
+ - '**/src/**/kotlin/**.kt'
+ - '**/src/**/java/**.java'
+ - '**/build.gradle.kts'
+ - 'build.gradle.kts'
+ - 'settings.gradle.kts'
+ - 'gradle.properties'
# 手动触发工作流
workflow_dispatch:
env:
+ JAVA_VERSION: 21
+ JAVA_DISTRIBUTION: zulu
+ GRADLE_VERSION: 8.5
IS_CI: true
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
@@ -32,42 +34,59 @@ env:
GRADLE_OPTS: "-Dfile.encoding=UTF-8"
jobs:
- publish-snapshot:
- name: Publish snapshot
+ run-test:
+ name: Run all tests
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- # 检出仓库代码
- - name: Check out repo
- uses: actions/checkout@v4
+ - uses: actions/checkout@v4
+ - uses: actions/setup-java@v4
+ with:
+ distribution: ${{ env.JAVA_DISTRIBUTION }}
+ java-version: ${{ env.JAVA_VERSION }}
+ cache: 'gradle'
- # setup Java
- - name: Setup java
- uses: actions/setup-java@v4
+ # setup Gradle
+ - name: Gradle test and publish snapshot
+ uses: gradle/actions/setup-gradle@v3
with:
- distribution: 'zulu'
- java-version: 21
+ gradle-version: ${{ env.GRADLE_VERSION }}
+
+ - name: Gradle run all tests
+ run: gradle assemble allTests --stacktrace --warning-mode all
+
+ publish-snapshots:
+ name: Publish snapshots
+ needs: run-test
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-java@v4
+ with:
+ distribution: ${{ env.JAVA_DISTRIBUTION }}
+ java-version: ${{ env.JAVA_VERSION }}
+ cache: 'gradle'
# setup Gradle
- - name: Gradle publish snapshot
+ - name: Publish snapshots
uses: gradle/actions/setup-gradle@v3
with:
- gradle-version: 8.5
+ gradle-version: ${{ env.GRADLE_VERSION }}
arguments: |
- test
publishToSonatype
closeAndReleaseStagingRepositories
- --info
- --warning-mode all
- -Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
- -Porg.gradle.daemon=false
+ --info
+ --warning-mode all
+ -Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
+ env:
+ SIMBOT_IS_SNAPSHOT: true
deploy-doc:
name: Deploy snapshot doc
runs-on: ubuntu-latest
- needs: publish-snapshot
+ needs: publish-snapshots
steps:
# 检出仓库代码
- name: Check out repo
diff --git a/.github/workflows/publish-v4-release.yml.bk b/.github/workflows/publish-v4-release.yml.bk
deleted file mode 100644
index 1edf441e..00000000
--- a/.github/workflows/publish-v4-release.yml.bk
+++ /dev/null
@@ -1,172 +0,0 @@
-name: Publish V4 Release
-on:
- push:
- tags:
- - 'v4**'
-
-env:
- IS_CI: true
- GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
- GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
- GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
- SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
- SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- GRADLE_OPTS: "-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
-
-jobs:
- run-test-and-publish-v4:
- name: Run test and publish V4
- strategy:
- matrix:
- os: [ macos-latest, windows-latest, ubuntu-latest ]
- runs-on: ${{ matrix.os }}
- steps:
- # 检出仓库代码
- - name: Check Out Repo
- uses: actions/checkout@v4
-
- # setup Java
- - name: Setup Java
- uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 21
- cache: 'gradle'
-
- - name: Gradle Run Test
- uses: gradle/gradle-build-action@v3
- with:
- gradle-version: 8.5
-# arguments: clean assemble test
- arguments: assemble test -Porg.gradle.daemon=false
-
- - name: Gradle Publish Release
- uses: gradle/gradle-build-action@v3
- with:
- gradle-version: 8.5
- arguments: |
- publishToSonatype
- closeAndReleaseStagingRepositories
- --info
- --warning-mode all
- -x test
- --build-cache
- -Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxPermSize=1g -Dfile.encoding=UTF-8"
- -Porg.gradle.daemon=false
-
- env:
- SIMBOT_IS_SNAPSHOT: false
- SIMBOT_RELEASES_ONLY: true
-
- create-release-v4:
- name: Create V4 release
- runs-on: ubuntu-latest
- needs: run-test-and-publish-v4
- permissions:
- contents: write
- steps:
- # 检出仓库代码
- - name: Check Out Repo
- uses: actions/checkout@v4
-
- # Create gitHub release
- - name: Create Github Release
- uses: softprops/action-gh-release@v0.1.14
- with:
- token: ${{ secrets.PUSH_TOKEN }}
- body_path: .changelog/${{ github.ref_name }}.md
- generate_release_notes: true
- prerelease: ${{ contains(github.ref_name, 'preview') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'alpha') || contains(github.ref_name, 'dev') }}
-
- publish-snapshot-v4:
- name: Publish V4 snapshot
- runs-on: ubuntu-latest
- needs: run-test-and-publish-v4
- steps:
- # 检出仓库代码
- - name: Check out repo
- uses: actions/checkout@v4
-
- # setup Java
- - name: Setup java
- uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 21
-
- # setup Gradle
- - name: Gradle publish snapshot
- uses: gradle/gradle-build-action@v3
- with:
- gradle-version: 8.5
- arguments: clean test publishToSonatype closeAndReleaseStagingRepositories
- env:
- SIMBOT_IS_SNAPSHOT: true
- SIMBOT_SNAPSHOT_ONLY: true
-
- deploy-v4-doc:
- name: Deploy-doc
- runs-on: ubuntu-latest
- needs: run-test-and-publish
- steps:
- # 检出仓库代码
- - name: Check out repo
- uses: actions/checkout@v4
- with:
- persist-credentials: false
- fetch-depth: 0
- # setup Java
- - name: Setup java
- uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 21
-
- # setup Gradle
- - name: Gradle generate documentation
- uses: gradle/gradle-build-action@v3
- with:
- gradle-version: 8.5
- arguments: |
- -Porg.gradle.jvmargs="-Xmx4g -Xms4g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
- -Porg.gradle.daemon=false
- --info
- --warning-mode all
- -x test
- --build-cache
- dokkaHtmlMultiModule
-
- - name: Push to doc repository
- uses: peaceiris/actions-gh-pages@v3
- with:
- personal_token: ${{ secrets.PUSH_TOKEN }}
- external_repository: simple-robot-library/simbot3-api-docs
- publish_branch: kdoc-deploy/component-kook-v4
- publish_dir: ./build/dokka/html
- # deploy to sub dir
- destination_dir: components/kook-v4
-
-# deploy-website:
-# name: Deploy Website
-# runs-on: ubuntu-latest
-# needs: run-test-and-publish
-# steps:
-# - uses: actions/checkout@v4
-# - uses: actions/setup-node@v3
-# with:
-# node-version: 16.x
-# cache: npm
-# cache-dependency-path: ./website/package-lock.json
-#
-# - run: |
-# npm ci
-# npm run build
-# working-directory: ./website
-#
-# # https://github.com/marketplace/actions/github-pages-action
-# - name: Push to doc repository
-# uses: peaceiris/actions-gh-pages@v3
-# with:
-# personal_token: ${{ secrets.PUSH_TOKEN }}
-# publish_branch: gh-pages
-# publish_dir: ./website/build
diff --git a/.github/workflows/publish-v4-snapshot.yml.bk b/.github/workflows/publish-v4-snapshot.yml.bk
deleted file mode 100644
index f3b4ab82..00000000
--- a/.github/workflows/publish-v4-snapshot.yml.bk
+++ /dev/null
@@ -1,107 +0,0 @@
-name: Publish Snapshot
-on:
- push:
- branches:
- - main
- - dev-snapshot**
- - v*.*.**
- - dev/main
- - dev/ver/**
-
- paths:
- - '**src/main/kotlin/**.kt'
- - '**src/main/java/**.java'
- - 'buildSrc/**'
- - '**.kts'
-
- tags-ignore:
- - 'v4**'
-
- # 手动触发工作流
- workflow_dispatch:
-
-env:
- IS_CI: true
- GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
- GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
- GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
- SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
- SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- SIMBOT_IS_SNAPSHOT: true
- SIMBOT_SNAPSHOT_ONLY: true
- GRADLE_OPTS: "-Dfile.encoding=UTF-8"
-
-jobs:
- publish-snapshot:
- name: Publish snapshot
- strategy:
- matrix:
- os: [ macos-latest, windows-latest, ubuntu-latest ]
- runs-on: ${{ matrix.os }}
- steps:
- # 检出仓库代码
- - name: Check out repo
- uses: actions/checkout@v4
-
- # setup Java
- - name: Setup java
- uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 21
-
- # setup Gradle
- - name: Gradle publish snapshot
- uses: gradle/gradle-build-action@v3
- with:
- gradle-version: 8.5
- arguments: |
- test
- publishToSonatype
- closeAndReleaseStagingRepositories
- --info
- --warning-mode all
- -Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
- -Porg.gradle.daemon=false
-
- deploy-doc:
- name: Deploy snapshot doc
- runs-on: ubuntu-latest
- needs: publish-snapshot
- steps:
- # 检出仓库代码
- - name: Check out repo
- uses: actions/checkout@v4
- with:
- persist-credentials: false
- fetch-depth: 0
- # setup Java
- - name: Setup java
- uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 21
-
- # setup Gradle
- - name: Gradle generate documentation
- uses: gradle/gradle-build-action@v3
- with:
- gradle-version: 8.5
- arguments: |
- -Porg.gradle.jvmargs="-Xmx4g -Xms4g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
- -Porg.gradle.daemon=false
- --info
- --warning-mode all
- -x test
- --build-cache
- dokkaHtmlMultiModule
-
- - name: Push to doc repository
- uses: peaceiris/actions-gh-pages@v3
- with:
- personal_token: ${{ secrets.PUSH_TOKEN }}
- external_repository: simple-robot-library/simbot3-api-docs
- publish_branch: kdoc-deploy/snapshots/component-kook
- publish_dir: ./build/dokka/html
- # deploy to sub dir
- destination_dir: snapshots/components/kook
diff --git a/.github/workflows/qodana_code_quality.yml b/.github/workflows/qodana_code_quality.yml
index 0a9096b0..a70cd6ab 100644
--- a/.github/workflows/qodana_code_quality.yml
+++ b/.github/workflows/qodana_code_quality.yml
@@ -2,6 +2,9 @@ name: Qodana
on:
workflow_dispatch:
pull_request:
+ branches:
+ - dev/main
+ - main
push:
branches:
- dev/main
@@ -9,12 +12,22 @@ on:
jobs:
qodana:
+ if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ pull-requests: write
+ checks: write
steps:
- uses: actions/checkout@v4
with:
- fetch-depth: 0
+ ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
+ fetch-depth: 0 # a full history is required for pull request analysis
- name: 'Qodana Scan'
- uses: JetBrains/qodana-action@v2023.2
+ uses: JetBrains/qodana-action@main
+ with:
+ upload-result: true
+ github-token: ${{ secrets.FORLIY_ACCESS_TOKEN }}
env:
- QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
+ QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} # read the steps about it below
+ GITHUB_TOKEN: ${{ secrets.FORLIY_ACCESS_TOKEN }}
diff --git a/.simbot/dokka-assets/css/kdoc-style.css b/.simbot/dokka-assets/css/kdoc-style.css
index 83a1461d..f06f72cc 100644
--- a/.simbot/dokka-assets/css/kdoc-style.css
+++ b/.simbot/dokka-assets/css/kdoc-style.css
@@ -1,8 +1,26 @@
-.library-name a::before {
- background: url("../images/logo-icon.svg") center no-repeat;
- background-size: contain;
- width: 40px;
- height: 40px;
- top: -12px;
- left: -50px;
+/*
+ * Copyright (c) 2024. ForteScarlet.
+ *
+ * Project https://github.com/simple-robot/simpler-robot
+ * Email ForteScarlet@163.com
+ *
+ * This file is part of the Simple Robot Library (Alias: simple-robot, simbot, etc.).
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Lesser GNU General Public License for more details.
+ *
+ * You should have received a copy of the Lesser GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+:root {
+ --dokka-logo-image-url: url('../images/logo-icon-light.svg');
}
diff --git a/.simbot/dokka-assets/logo-icon-light.svg b/.simbot/dokka-assets/logo-icon-light.svg
new file mode 100644
index 00000000..4cb36253
--- /dev/null
+++ b/.simbot/dokka-assets/logo-icon-light.svg
@@ -0,0 +1,78 @@
+
+
+
+
diff --git a/.simbot/dokka-assets/logo-icon.svg b/.simbot/dokka-assets/logo-icon.svg
index 4cb36253..a1d8512f 100644
--- a/.simbot/dokka-assets/logo-icon.svg
+++ b/.simbot/dokka-assets/logo-icon.svg
@@ -22,57 +22,57 @@
-
-->
-