Skip to content

Commit

Permalink
Merge pull request #162 from simple-robot/dev/main
Browse files Browse the repository at this point in the history
Release: v4.0.0-beta5
  • Loading branch information
ForteScarlet authored Aug 7, 2024
2 parents b7d7792 + b0fb96c commit 4e8a500
Show file tree
Hide file tree
Showing 76 changed files with 1,182 additions and 946 deletions.
7 changes: 7 additions & 0 deletions .changelog/v4.0.0-beta5.md
Original file line number Diff line number Diff line change
@@ -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),感谢您的贡献与支持!
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
33 changes: 28 additions & 5 deletions .github/ISSUE_TEMPLATE/report.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -14,11 +13,34 @@ body:
<hr />
- 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
Expand All @@ -29,7 +51,8 @@ body:
- type: dropdown
id: build-tool
attributes:
label: 使用的构建工具
label: 项目构建工具
description: 如果没有或无对应选项则选择'其他'后在后续描述中补充说明
options:
- Maven
- Gradle
Expand All @@ -41,6 +64,6 @@ body:
id: description
attributes:
label: 内容描述
description: 描述你的反馈内容
description: 描述你的反馈内容。(注意日志、代码等特殊内容格式,确保易于阅读)
validations:
required: true
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ updates:
interval: weekly
labels:
- dependencies
assignees:
- ForteScarlet
open-pull-requests-limit: 10
30 changes: 0 additions & 30 deletions .github/workflows/deploy-website-v4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
38 changes: 0 additions & 38 deletions .github/workflows/deploy-website.yml.bk

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/doc-test-branch.yml.bk

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/publish-kdoc.yml
Original file line number Diff line number Diff line change
@@ -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

86 changes: 34 additions & 52 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
Loading

0 comments on commit 4e8a500

Please sign in to comment.