Skip to content

Commit

Permalink
Merge pull request #65 from simple-robot/dev/main
Browse files Browse the repository at this point in the history
Release: v1.0.0-RC
  • Loading branch information
ForteScarlet authored Jul 1, 2024
2 parents 3441700 + 429a4e6 commit 9bde2b8
Show file tree
Hide file tree
Showing 14 changed files with 265 additions and 187 deletions.
11 changes: 11 additions & 0 deletions .changelog/v1.0.0-RC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> 对应核心版本: [**v4.1.0**](https://github.com/simple-robot/simpler-robot/releases/tag/v4.1.0)

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

也欢迎您为我们献上一颗 `star`,这是对我们最大的鼓励与认可!

> [!note]
> 这是一个RC版本。由于之前内部的打包、发布配置进行过一次较大的变动,因此使用此版本先对版本的发布流程进行一次验证。
> 如果流程无误、且没有其他问题、BUG反馈,则后续会跟进 `v1.0.0` 的发布。
133 changes: 68 additions & 65 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- v**

env:
JAVA_VERSION: 21
JAVA_DISTRIBUTION: zulu
IS_CI: true
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
Expand All @@ -14,63 +16,77 @@ env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GRADLE_OPTS: "-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"

GRADLE_VERSION: 8.5

jobs:
run-test-and-publish:
name: Run test and publish
run-test:
name: Run all tests
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
# 检出仓库代码
- uses: actions/checkout@v4

# setup Java
- name: Setup Java
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
# https://github.com/gradle/actions/blob/main/docs/setup-gradle.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5
arguments: assemble test -Porg.gradle.daemon=false
gradle-version: ${{ env.GRADLE_VERSION }}

- name: Run all tests
run: gradle assemble allTests --stacktrace --warning-mode all

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
# setup Java
- uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
cache: 'gradle'

# setup Gradle
- name: Publish Release
- name: Publish releases
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5
gradle-version: ${{ env.GRADLE_VERSION }}
arguments: |
publishToSonatype
closeAndReleaseStagingRepositories
publishToSonatype
closeAndReleaseStagingRepositories
--info
--warning-mode all
-x test
--build-cache
--warning-mode all
-x test
--build-cache
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
env:
SIMBOT_IS_SNAPSHOT: false
SIMBOT_RELEASES_ONLY: true

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

- uses: actions/checkout@v4
# Create gitHub release
- name: Create Github Release
uses: softprops/action-gh-release@v2
Expand All @@ -81,76 +97,63 @@ jobs:
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, 'preview') || contains(github.ref_name, 'alpha') }}

# || 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
publish-snapshots:
name: Publish snapshots
# 交叉编译 support
# see https://kotlinlang.org/docs/multiplatform-publish-lib.html#host-requirements
runs-on: macos-latest
needs: publish-releases
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 }}

# setup Gradle
- name: Gradle publish snapshot
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5
gradle-version: ${{ env.GRADLE_VERSION }}
arguments: |
publishToSonatype
closeAndReleaseStagingRepositories
--info
--warning-mode all
-x test
--build-cache
publishToSonatype
closeAndReleaseStagingRepositories
--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
name: Deploy KDoc
runs-on: ubuntu-latest
needs: run-test-and-publish
needs: publish-releases
steps:
# 检出仓库代码
- name: Check out repo
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
# setup Java
- name: Setup java
uses: actions/setup-java@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}

# setup Gradle
- name: Gradle generate documentation
- name: Generate documentation
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5
gradle-version: ${{ env.GRADLE_VERSION }}
arguments: |
dokkaHtmlMultiModule
dokkaHtmlMultiModule
--info
--warning-mode all
-x test
--build-cache
--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
Expand Down
88 changes: 54 additions & 34 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ on:
workflow_dispatch:

env:
JAVA_VERSION: 21
JAVA_DISTRIBUTION: zulu
IS_CI: true
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
Expand All @@ -32,73 +34,91 @@ env:
SIMBOT_IS_SNAPSHOT: true
SIMBOT_SNAPSHOT_ONLY: true
GRADLE_OPTS: "-Dfile.encoding=UTF-8"

GRADLE_VERSION: 8.5

jobs:
publish-snapshot:
name: Publish snapshot
run-test:
name: Run all tests
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
os: [ macos-latest, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
# 检出仓库代码
- name: Check out repo
uses: actions/checkout@v4

- uses: actions/checkout@v4
# setup Java
- name: Setup java
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
cache: 'gradle'
# setup Gradle
# https://github.com/gradle/actions/blob/main/docs/setup-gradle.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ env.GRADLE_VERSION }}

- name: 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 test and 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-doc
name: Deploy KDoc
runs-on: ubuntu-latest
needs: publish-snapshot
needs: publish-snapshots
steps:
# 检出仓库代码
- name: Check out repo
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
# setup Java
- name: Setup java
uses: actions/setup-java@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 generate documentation
- name: Setup Gradle generate documentation
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5
gradle-version: ${{ env.GRADLE_VERSION }}
arguments: |
-Porg.gradle.jvmargs="-Xmx4g -Xms4g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
dokkaHtmlMultiModule
-Porg.gradle.jvmargs="-Xmx4g -Xms4g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
-Porg.gradle.daemon=false
-DisSnapshot=false
--info
--warning-mode all
-x test
--warning-mode all
-x test
--build-cache
dokkaHtmlMultiModule
env:
SIMBOT_IS_SNAPSHOT: false

- name: Push to doc repository
uses: peaceiris/actions-gh-pages@v3
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/test-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,12 @@ jobs:
with:
distribution: 'zulu'
java-version: 21
# cache: 'gradle'
cache: 'gradle'

- name: Run All Tests
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5
arguments: |
assemble
build
allTests
--info
--warning-mode all
# --build-cache
# -Porg.gradle.daemon=false
# -Porg.gradle.jvmargs="-Xmx4g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
- uses: gradle/actions/setup-gradle@v3

- name: Run all tests
run: gradle assemble build allTests --info --warning-mode all

- name: Upload test reports
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion Writerside/v.list
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<var name="jb" value="阻塞"/>
<var name="ja" value="异步"/>
<var name="jr" value="响应式"/>
<var name="version" value="0.9.0"/>
<var name="version" value="0.9.1"/>
<var name="d-group" value="love.forte.simbot.component"/>
<var name="d-ob11-id" value="simbot-component-onebot-v11"/>
<var name="minimum-core-version" value="4.1.0"/>
Expand Down
Loading

0 comments on commit 9bde2b8

Please sign in to comment.