-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e22dbad
Showing
36 changed files
with
5,202 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
*.sh text eol=lf | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
github: chr233 | ||
custom: ["https://afdian.net/@chr233", "https://steamcommunity.com/tradeoffer/new/?partner=221260487&token=xgqMgL-i"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
name: Bug report / 错误汇报 | ||
about: If you need help / 如果你需要帮助 | ||
title: "" | ||
labels: bug | ||
assignees: "" | ||
--- | ||
|
||
**Describe the bug / Bug 描述** | ||
Describe what the bug is | ||
简单描述一下是什么 bug | ||
|
||
**Error Log / 错误日志** | ||
Please paste the error log of ASFBuffBot, for example | ||
请在此粘贴 ASFBuffBot 的错误日志, 示例如下 | ||
|
||
```txt | ||
ASFBuffBot 遇到错误, 日志如下 | ||
========================================== | ||
- 原始消息: TEST | ||
- Access: Owner | ||
- ASF 版本: 5.4.0.3 | ||
- 插件版本: 1.7.5.0 | ||
========================================== | ||
{ | ||
"EULA": true, | ||
"Statistic": true, | ||
"DevFeature": false | ||
} | ||
========================================== | ||
- 错误类型: System.Exception | ||
- 错误消息: Exception of type 'System.Exception' was thrown. | ||
at ASFBuffBot.ASFBuffBot.ResponseCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamId) | ||
at ASFBuffBot.ASFBuffBot.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamId) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: Feature request / 新功能提议 | ||
about: I want new command / 我需要新的功能 | ||
title: "" | ||
labels: enhancement | ||
assignees: "" | ||
--- | ||
|
||
**Describe what feature you want / 描述需要加入的新功能** | ||
Description of what you want. | ||
描述一下新功能的用途 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: autobuild | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
env: | ||
PROJECT_NAME: "ASFBuffBot" | ||
DOTNET_SDK_VERSION: 7.0.x | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [zh-Hans] | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3.1.0 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v3.0.3 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }} | ||
|
||
- name: Verify .NET Core | ||
run: dotnet --info | ||
|
||
- name: Change language file to ${{ matrix.language }} | ||
shell: pwsh | ||
run: | | ||
$projectName = "${{ env.PROJECT_NAME }}"; | ||
$language = "${{ matrix.language }}"; | ||
$localizationFolder = ".\$projectName\Localization"; | ||
Copy-Item -Path "$localizationFolder\Langs.$language.resx" -Destination "$localizationFolder\Langs.resx" -Force; | ||
- name: Restore packages in preparation for ${{ env.PROJECT_NAME }} publishing | ||
run: dotnet restore ${{ env.PROJECT_NAME }} -p:ContinuousIntegrationBuild=true --nologo | ||
|
||
- name: Publish ${{ env.PROJECT_NAME }} ${{ matrix.language }} | ||
run: dotnet publish ${{ env.PROJECT_NAME }} -o ./tmp/ -c Release | ||
|
||
- name: Zip files | ||
run: 7z a -bd -slp -tzip -mm=Deflate -mx=5 -mfb=150 -mpass=10 "./dist/${{ env.PROJECT_NAME }}-${{ matrix.language }}.zip" "./tmp/${{ env.PROJECT_NAME }}.dll" | ||
|
||
- name: Upload ${{ env.PROJECT_NAME }} ${{ matrix.language }} | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v3.1.1 | ||
with: | ||
name: ${{ env.PROJECT_NAME }}-${{ matrix.language }}.zip | ||
path: ./dist/${{ env.PROJECT_NAME }}-${{ matrix.language }}.zip | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3.1.0 | ||
|
||
- name: Download ASFBuffBot-zh-Hans artifact from windows-latest | ||
uses: actions/download-artifact@v3.0.1 | ||
with: | ||
name: ASFBuffBot-zh-Hans.zip | ||
path: out | ||
|
||
# - name: Download ASFBuffBot-en-US artifact from windows-latest | ||
# uses: actions/download-artifact@v3.0.1 | ||
# with: | ||
# name: ASFBuffBot-en-US.zip | ||
# path: out | ||
|
||
# - name: Download ASFBuffBot-ru-RU artifact from windows-latest | ||
# uses: actions/download-artifact@v3.0.1 | ||
# with: | ||
# name: ASFBuffBot-ru-RU.zip | ||
# path: out | ||
|
||
- name: Create ASFBuffBot GitHub release | ||
id: github_release | ||
uses: actions/create-release@v1.1.4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref_name }} | ||
release_name: ASFBuffBot ${{ github.ref_name }} | ||
body: | | ||
[](https://github.com/chr233/ASFBuffBot/releases/tag/${{ github.ref_name }})  | ||
使用命令 `CTEU` 自动更新插件 | ||
Use command `CTEU` to update this plugin | ||
release created bt github actions | ||
prerelease: true | ||
|
||
- name: Upload ASFBuffBot-zh-Hans to GitHub release | ||
uses: actions/upload-release-asset@v1.0.2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.github_release.outputs.upload_url }} | ||
asset_path: out/ASFBuffBot-zh-Hans.zip | ||
asset_name: ASFBuffBot-zh-Hans.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: cleanartifacts | ||
|
||
on: | ||
schedule: | ||
- cron: "0 1 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
remove-old-artifacts: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Remove old artifacts | ||
uses: c-hive/gha-remove-artifacts@v1 | ||
with: | ||
age: "1 seconds" |
Oops, something went wrong.