Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from simple-robot/dev
Browse files Browse the repository at this point in the history
Release v0.0.2
  • Loading branch information
ForteScarlet authored Jan 2, 2024
2 parents 442db1b + 11137e4 commit d0e344c
Show file tree
Hide file tree
Showing 36 changed files with 197 additions and 106 deletions.
8 changes: 8 additions & 0 deletions .changelog/v0.0.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
> 对应核心版本: [**v3.3.0**](https://github.com/simple-robot/simpler-robot/releases/tag/v3.3.0)
> [!warning]
> 目前版本尚处于 **早期** 阶段,代表仍然可能存在大量已知问题或未知问题,
以及未完善的内容和落后于官方更新的内容。**

我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-miyoushe/issues)[协助](https://github.com/simple-robot/simbot-component-miyoushe/pulls)
感谢您的贡献与支持!
107 changes: 107 additions & 0 deletions .github/workflows/deploy-dev-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Deploy documentation

on:
# If specified, the workflow will be triggered automatically once you push to the `main` branch.
# Replace `main` with your branch’s name
push:
branches:
- dev
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/villa
# Replace HI with the ID of the instance in capital letters
ARTIFACT: webHelpVILLA2-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
with:
name: documentation-dev
1 change: 1 addition & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 6 additions & 0 deletions .idea/detekt.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/templateLanguages.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# v0.0.2

> Release & Pull Notes: [v0.0.2](https://github.com/simple-robot/simpler-robot/releases/tag/v0.0.2)


> Release & Pull Notes: [v0.0.1](https://github.com/simple-robot/simpler-robot/releases/tag/v0.0.1)
- api: 部分API实现与部分测试 ([`fbcc331`](https://github.com/simple-robot/simpler-robot/commit/fbcc331))

2 changes: 1 addition & 1 deletion Writerside/v.list
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd">
<vars>
<var name="product" value="Writerside"/>
<var instance="villa" name="version" value="0.0.1"/>
<var instance="villa" name="version" value="0.0.2"/>
<var instance="villa" name="kt-version" value="1.9.21"/>
<var name="copyright-year" value="2023-2024"/>
</vars>
1 change: 1 addition & 0 deletions Writerside/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="simbot-component-miyoushe-villa"/>
<instance src="villa.tree" version="v%version%" web-path="/villa/" />

</ihp>
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/P.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object P : ProjectDetail() {
override val homepage: String
get() = HOMEPAGE

private val baseVersion = v(0, 0, 1)
private val baseVersion = v(0, 0, 2)

// private val alphaSuffix = v("alpha", 1)
// baseVersion - alphaSuffix
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/changelog/GenerateChangelog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fun Project.generateChangelog(tag: String) {
> 对应核心版本: [**v$coreVersion**](https://github.com/simple-robot/simpler-robot/releases/tag/v$coreVersion)
> [!warning]
> 目前版本尚处于 **早期** 阶段,代表仍然可能存在大量[已知问题](https://github.com/simple-robot/simbot-component-miyoushe/issues)或未知问题
> 目前版本尚处于 **早期** 阶段,代表仍然可能存在大量已知问题或未知问题
以及未完善的内容和落后于官方更新的内容。**
我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-miyoushe/issues)或[协助](https://github.com/simple-robot/simbot-component-miyoushe/pulls),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,27 @@ tasks.create("createChangelog") {
}
}

tasks.create("updateWebsiteVersionJson") {
group = "documentation"
doFirst {
val version = P.version.toString()

val websiteVersionJsonDir = rootProject.file("website/static")
if (!websiteVersionJsonDir.exists()) {
websiteVersionJsonDir.mkdirs()
}
val websiteVersionJsonFile = File(websiteVersionJsonDir, "version.json")
if (!websiteVersionJsonFile.exists()) {
websiteVersionJsonFile.createNewFile()
}

websiteVersionJsonFile.writeText(
"""
{"version": "$version"}
""".trimIndent()
)
}
}
//tasks.create("updateWebsiteVersionJson") {
// group = "documentation"
// doFirst {
// val version = P.version.toString()
//
// val websiteVersionJsonDir = rootProject.file("website/static")
// if (!websiteVersionJsonDir.exists()) {
// websiteVersionJsonDir.mkdirs()
// }
// val websiteVersionJsonFile = File(websiteVersionJsonDir, "version.json")
// if (!websiteVersionJsonFile.exists()) {
// websiteVersionJsonFile.createNewFile()
// }
//
// websiteVersionJsonFile.writeText(
// """
// {"version": "$version"}
// """.trimIndent()
// )
// }
//}

//fun repoRow(moduleName: String, group: String, id: String, version: String): String {
// return "| $moduleName | [$moduleName: v$version](https://repo1.maven.org/maven2/${group.replace(".", "/")}/${id.replace(".", "/")}/$version) | [$moduleName: v$version](https://search.maven.org/artifact/$group/$id/$version/jar) |"
Expand Down
3 changes: 3 additions & 0 deletions documentation/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public class VillaComponent : Component {
override val id: String
get() = ID_VALUE

override fun toString(): String = "VillaComponent(id=$ID_VALUE)"

public companion object Factory : ComponentFactory<VillaComponent, MiyousheVillaComponentConfiguration> {
/**
* 组件的ID标识常量。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ public abstract class VillaAddQuickEmoticonEvent : VillaEvent<AddQuickEmoticon>(
override val key: Event.Key<VillaAddQuickEmoticonEvent>
get() = Key

override fun toString(): String = "VillaAddQuickEmoticonEvent(sourceEvent=$sourceEvent)"

public companion object Key : BaseEventKey<VillaAddQuickEmoticonEvent>(
"villa.add_quick_emoticon", VillaEvent, ChannelEvent
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public abstract class VillaAuditCallbackEvent : VillaEvent<AuditCallback>(), Gui
override val key: Event.Key<VillaAuditCallbackEvent>
get() = Key

override fun toString(): String = "VillaAuditCallbackEvent(sourceEvent=$sourceEvent)"

public companion object Key : BaseEventKey<VillaAuditCallbackEvent>(
"villa.audit.callback", VillaEvent, GuildEvent
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public abstract class VillaCreateRobotEvent : VillaBotEvent<CreateRobot>() {
override val key: Event.Key<out VillaCreateRobotEvent>
get() = Key

override fun toString(): String = "VillaCreateRobotEvent(sourceEvent=$sourceEvent)"

public companion object Key : BaseEventKey<VillaCreateRobotEvent>(
"villa.bot.create", VillaBotEvent
) {
Expand All @@ -101,6 +103,8 @@ public abstract class VillaDeleteRobotEvent : VillaBotEvent<DeleteRobot>() {
override val key: Event.Key<out VillaDeleteRobotEvent>
get() = Key

override fun toString(): String = "VillaDeleteRobotEvent(sourceEvent=$sourceEvent)"

public companion object Key : BaseEventKey<VillaDeleteRobotEvent>(
"villa.bot.delete", VillaBotEvent
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public abstract class VillaClickMsgComponentEvent : VillaEvent<ClickMsgComponent
override val key: Event.Key<VillaClickMsgComponentEvent>
get() = Key

override fun toString(): String = "VillaClickMsgComponentEvent(sourceEvent=$sourceEvent)"

public companion object Key : BaseEventKey<VillaClickMsgComponentEvent>(
"villa.click_msg_component", VillaEvent
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public abstract class VillaEvent<E : EventExtendData> : Event {
override val timestamp: Timestamp
get() = Timestamp.byMillisecond(sourceEvent.sendAt)

override fun toString(): String = "VillaEvent(sourceEvent=$sourceEvent)"

abstract override val key: Event.Key<out VillaEvent<*>>

public companion object Key : BaseEventKey<VillaEvent<*>>(
Expand Down
Loading

0 comments on commit d0e344c

Please sign in to comment.