Skip to content

Commit

Permalink
Merge pull request #112 from simple-robot/v4-dev/v4-upgrade
Browse files Browse the repository at this point in the history
Upgrade simbot to v4
  • Loading branch information
ForteScarlet authored Jan 25, 2024
2 parents e09a71a + 012237f commit d43c2dc
Show file tree
Hide file tree
Showing 357 changed files with 17,703 additions and 8,033 deletions.
11 changes: 11 additions & 0 deletions .changelog/v4.0.0-dev1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> 对应核心版本: [**v4.0.0-dev2**](https://github.com/simple-robot/simpler-robot/releases/tag/v4.0.0-dev2)

> [!warning]
> **目前版本处于 `dev` 阶段,代表此版本是一个开发预览版,可能不稳定、可能随时发生更改、且不保证可用性。**

我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-qq-guild/issues)[协助](https://github.com/simple-robot/simbot-component-qq-guild/pulls)
感谢您的贡献与支持!

也欢迎您为我们献上一颗 `star`,这是对我们最大的鼓励与认可!
11 changes: 11 additions & 0 deletions .changelog/v4.0.0-dev2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> 对应核心版本: [**v4.0.0-dev4**](https://github.com/simple-robot/simpler-robot/releases/tag/v4.0.0-dev4)

> [!warning]
> **目前版本处于 `dev` 阶段,代表此版本是一个开发预览版,可能不稳定、可能随时发生更改、且不保证可用性。**

我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-qq-guild/issues)[协助](https://github.com/simple-robot/simbot-component-qq-guild/pulls)
感谢您的贡献与支持!

也欢迎您为我们献上一颗 `star`,这是对我们最大的鼓励与认可!
11 changes: 11 additions & 0 deletions .changelog/v4.0.0-dev3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> 对应核心版本: [**v4.0.0-dev6**](https://github.com/simple-robot/simpler-robot/releases/tag/v4.0.0-dev6)

> [!warning]
> **目前版本处于 `dev` 阶段,代表此版本是一个开发预览版,可能不稳定、可能随时发生更改、且不保证可用性。**

我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-qq-guild/issues)[协助](https://github.com/simple-robot/simbot-component-qq-guild/pulls)
感谢您的贡献与支持!

也欢迎您为我们献上一颗 `star`,这是对我们最大的鼓励与认可!
11 changes: 11 additions & 0 deletions .changelog/v4.0.0-dev4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> 对应核心版本: [**v4.0.0-dev11**](https://github.com/simple-robot/simpler-robot/releases/tag/v4.0.0-dev11)

> [!warning]
> **目前版本处于 `dev` 阶段,代表此版本是一个开发预览版,可能不稳定、可能随时发生更改、且不保证可用性。**

我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-qq-guild/issues)[协助](https://github.com/simple-robot/simbot-component-qq-guild/pulls)
感谢您的贡献与支持!

也欢迎您为我们献上一颗 `star`,这是对我们最大的鼓励与认可!
11 changes: 11 additions & 0 deletions .changelog/v4.0.0-dev5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> 对应核心版本: [**v4.0.0-dev13**](https://github.com/simple-robot/simpler-robot/releases/tag/v4.0.0-dev13)

> [!warning]
> **目前版本处于 `dev` 阶段,代表此版本是一个开发预览版,可能不稳定、可能随时发生更改、且不保证可用性。**

我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-qq-guild/issues)[协助](https://github.com/simple-robot/simbot-component-qq-guild/pulls)
感谢您的贡献与支持!

也欢迎您为我们献上一颗 `star`,这是对我们最大的鼓励与认可!
11 changes: 11 additions & 0 deletions .changelog/v4.0.0-dev6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> 对应核心版本: [**v4.0.0-dev14**](https://github.com/simple-robot/simpler-robot/releases/tag/v4.0.0-dev14)

> [!warning]
> **目前版本处于 `dev` 阶段,代表此版本是一个开发预览版,可能不稳定、可能随时发生更改、且不保证可用性。**

我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-qq-guild/issues)[协助](https://github.com/simple-robot/simbot-component-qq-guild/pulls)
感谢您的贡献与支持!

也欢迎您为我们献上一颗 `star`,这是对我们最大的鼓励与认可!
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ blank_issues_enabled: true
contact_links:
- name: 问题反馈
url: https://github.com/simple-robot/simpler-robot/issues/new/choose
about: 统一的问题反馈处
about: simbot统一的问题反馈处

- name: 社区
url: https://github.com/orgs/simple-robot/discussions
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/deploy-v4-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Deploy Website
on:
push:
branches:
# - main
# - dev/ver/**
# - dev/main
- v4-dev/main
- v4-dev/v4-upgrade

paths:
- 'Writerside/**'
# Specify to run a workflow manually from the Actions tab on GitHub
workflow_dispatch:

# Gives the workflow permissions to clone the repo and create a page deployment
permissions:
id-token: write
pages: write

env:
# Name of module and id separated by a slash
INSTANCE: Writerside/d
# Replace HI with the ID of the instance in capital letters
ARTIFACT: webHelpD2-all.zip
# Writerside docker image version
DOCKER_VERSION: 232.10275
# Add the variable below to upload Algolia indexes
# Replace HI with the ID of the instance in capital letters
# ALGOLIA_ARTIFACT: algolia-indexes-HI.zip

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build Writerside docs using Docker
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}

- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT }}
artifacts/report.json
retention-days: 7

# Add the step below to upload Algolia indexes
# - name: Upload algolia-indexes
# uses: actions/upload-artifact@v3
# with:
# name: algolia-indexes
# path: artifacts/${{ env.ALGOLIA_ARTIFACT }}
# retention-days: 7

# Add the job below and artifacts/report.json on Upload documentation step above if you want to fail the build when documentation contains errors
test:
# Requires build job results
needs: build
runs-on: ubuntu-latest

steps:
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: docs
path: artifacts

- name: Test documentation
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.INSTANCE }}

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Requires the build job results
needs: test
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: docs

- name: Unzip artifact
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir

- name: Setup Pages
uses: actions/configure-pages@v2

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: dir

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/kdoc.yml.bk
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
personal_token: ${{ secrets.PUSH_TOKEN }}
external_repository: simple-robot-library/simbot3-api-docs
publish_branch: kdoc-deploy/component-tencent-guild
publish_branch: kdoc-deploy/component-tencent-guild-v3
publish_dir: ./build/dokka/html
# deploy to sub dir
destination_dir: components/tencent-guild
destination_dir: components/tencent-guild-v3
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
with:
personal_token: ${{ secrets.PUSH_TOKEN }}
external_repository: simple-robot-library/simbot3-api-docs
publish_branch: kdoc-deploy/component-qq-guild
publish_branch: kdoc-deploy/component-qq-guild-v3
publish_dir: ./build/dokka/html
# deploy to sub dir
destination_dir: components/qq-guild
destination_dir: components/qq-guild-v3
4 changes: 2 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
with:
personal_token: ${{ secrets.PUSH_TOKEN }}
external_repository: simple-robot-library/simbot3-api-docs
publish_branch: kdoc-deploy/snapshots/component-qq-guild
publish_branch: kdoc-deploy/snapshots/component-qq-guild-v3
publish_dir: ./build/dokka/html
# deploy to sub dir
destination_dir: snapshots/components/qq-guild
destination_dir: snapshots/components/qq-guild-v3
162 changes: 162 additions & 0 deletions .github/workflows/publish-v4-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
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 }}
OSSRH_USER: ${{ secrets.SONATYPE_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.SONATYPE_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@v3

# setup Java
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 21
cache: 'gradle'

# setup Gradle
- name: Gradle Run Test
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.5
arguments: assemble test -Porg.gradle.daemon=false

# setup Gradle
- name: Publish Release
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.5
arguments: |
publishToSonatype
closeAndReleaseStagingRepository
--info
--warning-mode all
-x test
--build-cache
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
-Porg.gradle.daemon=false
env:
SIMBOT_IS_SNAPSHOT: false
SIMBOT_RELEASES_ONLY: true

create-release:
name: Create release
runs-on: ubuntu-latest
needs: run-test-and-publish-v4
permissions:
contents: write
steps:
# 检出仓库代码
- name: Check Out Repo
uses: actions/checkout@v3

# 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:
name: Publish snapshot
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
needs: run-test-and-publish-v4
steps:
# 检出仓库代码
- name: Check out repo
uses: actions/checkout@v3

# setup Java
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 21

# setup Gradle
- name: Gradle publish snapshot
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.5
arguments: |
publishToSonatype
closeAndReleaseStagingRepository
--info
--warning-mode all
-x test
--build-cache
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
-Porg.gradle.daemon=false
env:
SIMBOT_IS_SNAPSHOT: true
SIMBOT_SNAPSHOT_ONLY: true

deploy-doc:
name: Deploy-doc
runs-on: ubuntu-latest
needs: run-test-and-publish-v4
steps:
# 检出仓库代码
- name: Check out repo
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
# setup Java
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 21

# setup Gradle
- name: Gradle generate documentation
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.5
arguments: |
dokkaHtmlMultiModule
--info
--warning-mode all
-x test
--build-cache
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
-Porg.gradle.daemon=false
- 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-qq-guild
publish_dir: ./build/dokka/html
# deploy to sub dir
destination_dir: components/qq-guild
Loading

0 comments on commit d43c2dc

Please sign in to comment.