Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prepare for 1.4.4 #194

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ addReviewers: false
# Set to true to add assignees to pull requests
addAssignees: author

#reviewers:
# - unknowIfGuestInDream
# - DreamAwakenFateBroke

# A number of assignees to add to the pull request
# Set to 0 to add all of the assignees.
# Uses numberOfReviewers if unset.
numberOfAssignees: 0
#numberOfReviewers: 0

skipKeywords:
- wip
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,18 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
reviewers:
- "unknowIfGuestInDream"
- "DreamAwakenFateBroke"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "friday"
timezone: "Asia/Shanghai"
reviewers:
- "unknowIfGuestInDream"
- "DreamAwakenFateBroke"
labels:
- "workflow"
- "github_actions"
1 change: 0 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ dependencies:
automerge:
- all: [ 'README.md' ]
- all: [ 'CHANGELOG.md' ]
- all: [ '.github/**' ]
- all: [ 'CONTRIBUTORS.md' ]
2 changes: 1 addition & 1 deletion .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ MD004: false # Unordered list style
MD007:
indent: 2 # Unordered list indentation
MD013:
line_length: 808 # Line length
line_length: 200 # Line length
MD026:
punctuation: ".,;:!。,;:" # List of not allowed
MD029: false # Ordered list item prefix
Expand Down
121 changes: 104 additions & 17 deletions .github/linters/sun_checks.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
<?xml version="1.0"?>
<!--
~ Copyright (c) 2023 unknowIfGuestInDream
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~ * Redistributions of source code must retain the above copyright
~ notice, this list of conditions and the following disclaimer.
~ * Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ * Neither the name of unknowIfGuestInDream, any associated website, nor the
~ names of its contributors may be used to endorse or promote products
~ derived from this software without specific prior written permission.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
~ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
~ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
~ DISCLAIMED. IN NO EVENT SHALL UNKNOWIFGUESTINDREAM BE LIABLE FOR ANY
~ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
~ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
~ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
~ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
~ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
~ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
Expand Down Expand Up @@ -39,7 +66,8 @@

<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
<module name="SuppressionFilter">
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}" default="checkstyle-suppressions.xml" />
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}"
default="checkstyle-suppressions.xml"/>
<property name="optional" value="true"/>
</module>

Expand All @@ -53,14 +81,21 @@

<!-- Checks that property files contain the same keys. -->
<!-- See https://checkstyle.org/config_misc.html#Translation -->
<module name="Translation"/>
<module name="Translation">
<property name="fileExtensions" value="properties, translations"/>
<property name="requiredTranslations" value="en, zh"/>
</module>
<module name="UniqueProperties"/>

<module name="FileLength">
<property name="max" value="1500"/>
</module>

<!-- Checks for Size Violations. -->
<!-- See https://checkstyle.org/config_sizes.html -->
<module name="FileLength"/>
<module name="LineLength">
<property name="fileExtensions" value="java" />
<property name="max" value="150" />
<property name="fileExtensions" value="java"/>
<property name="max" value="150"/>
</module>

<!-- Checks for whitespace -->
Expand Down Expand Up @@ -90,11 +125,27 @@
<!-- Checks for Javadoc comments. -->
<!-- See https://checkstyle.org/config_javadoc.html -->
<module name="InvalidJavadocPosition"/>
<module name="JavadocMethod"/>
<module name="JavadocType"/>
<module name="JavadocVariable"/>
<module name="JavadocStyle"/>
<module name="MissingJavadocMethod"/>
<module name="JavadocMethod">
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
</module>
<module name="JavadocType">
<property name="allowMissingParamTags" value="true"/>
<property name="allowUnknownTags" value="true"/>
</module>
<module name="MissingJavadocMethod">
<property name="allowMissingPropertyJavadoc" value="true"/>
<property name="allowedAnnotations" value="Override,Deprecated"/>
<property name="ignoreMethodNamesRegex" value="^main$"/>
</module>
<module name="MissingJavadocType"/>
<module name="RequireEmptyLineBeforeBlockTagGroup"/>
<module name="SingleLineJavadoc">
<property name="ignoredTags" value="@inheritDoc, @see"/>
<property name="violateExecutionOnNonTightHtml" value="true"/>
</module>
<module name="SummaryJavadocCheck"/>
<!-- Enables @SuppressWarnings Support -->
<module name="SuppressWarningsHolder"/>

Expand All @@ -109,10 +160,15 @@
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="AbstractClassName"/>
<module name="CatchParameterName"/>
<module name="ClassTypeParameterName"/>
<module name="IllegalIdentifierName"/>

<!-- Checks for imports -->
<!-- See https://checkstyle.org/config_imports.html -->
<module name="AvoidStarImport"/>
<module name="AvoidStaticImport"/>
<module name="IllegalImport"/>
<!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
Expand All @@ -124,12 +180,22 @@
<!-- See https://checkstyle.org/config_sizes.html -->
<module name="MethodLength"/>
<module name="ParameterNumber"/>
<module name="AnonInnerLength">
<property name="max" value="60"/>
</module>
<module name="LambdaBodyLength">
<property name="max" value="30"/>
</module>

<!-- Checks for whitespace -->
<!-- See https://checkstyle.org/config_whitespace.html -->
<module name="EmptyForIteratorPad"/>
<module name="EmptyLineSeparator">
<property name="tokens" value="METHOD_DEF"/>
</module>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoLineWrap"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
Expand All @@ -147,6 +213,7 @@
<!-- See https://checkstyle.org/config_blocks.html -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="EmptyCatchBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
Expand All @@ -158,30 +225,50 @@
<module name="HiddenField"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MissingSwitchDefault"/>
<module name="MultipleVariableDeclarations"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="AvoidNoArgumentSuperConstructorCall"/>
<module name="DefaultComesLast"/>
<module name="EqualsAvoidNull"/>
<module name="ExplicitInitialization"/>
<module name="IllegalCatch"/>
<module name="NoEnumTrailingComma"/>
<module name="NoFinalizer"/>
<module name="OneStatementPerLine">
<property name="treatTryResourcesAsStatement" value="true"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="StringLiteralEquality"/>
<module name="UnnecessaryParentheses"/>
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
<!-- <module name="UnusedLocalVariable"/> -->

<!-- Checks for class design -->
<!-- See https://checkstyle.org/config_design.html -->
<module name="DesignForExtension"/>
<module name="FinalClass"/>
<module name="DesignForExtension">
<property name="ignoredAnnotations" value="Override"/>
</module>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<module name="VisibilityModifier">
<property name="packageAllowed" value="true"/>
<property name="protectedAllowed" value="true"/>
<property name="ignoreAnnotationCanonicalNames" value="java.lang.Deprecated"/>
</module>

<!-- Miscellaneous other checks. -->
<!-- See https://checkstyle.org/config_misc.html -->
<module name="ArrayTypeStyle"/>
<module name="FinalParameters"/>
<module name="TodoComment"/>
<module name="UpperEll"/>
<module name="CommentsIndentation"/>

<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
<module name="SuppressionXpathFilter">
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}" default="checkstyle-xpath-suppressions.xml" />
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
default="checkstyle-xpath-suppressions.xml"/>
<property name="optional" value="true"/>
</module>

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Merge pull requests
uses: pascalgn/[email protected].5
uses: pascalgn/[email protected].6
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: "automerge,!work in progress"
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "pull-request-title"
MERGE_RETRIES: "10"
MERGE_RETRY_SLEEP: "60000"
MERGE_RETRY_SLEEP: "60000"
22 changes: 11 additions & 11 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
generate-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: BobAnkh/[email protected].3
with:
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
PATH: 'CHANGELOG.md'
COMMIT_MESSAGE: 'docs(changelog): update release notes'
TYPE: 'feat:Feature,fix:Bug Fixes,refactor:Refactor,perf:Performance Improvements'
PULL_REQUEST: 'master'
BRANCH: 'changelog'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: BobAnkh/[email protected].5
with:
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
PATH: 'CHANGELOG.md'
COMMIT_MESSAGE: 'docs(changelog): Update release notes'
TYPE: 'feat:Feature,fix:Bug Fixes,refactor:Refactor,perf:Performance Improvements'
PULL_REQUEST: 'master'
BRANCH: 'changelog'
23 changes: 6 additions & 17 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,19 @@
name: Java CI with Maven

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
pull_request_target:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
java: [ '11', '17' ]

os: [ ubuntu-latest, macos-latest, windows-latest ]
experimental: [ false ]
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.Java }}
Expand All @@ -37,4 +26,4 @@ jobs:
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml -Dmaven.test.skip=true
run: mvn -B package --file pom.xml -DskipTests
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Maven Central Repo Deployment
Dismissed Show dismissed Hide dismissed
# 触发脚本的事件 这里为发布release之后触发
on:
workflow_dispatch:
release:
types: [ released ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repo
uses: actions/checkout@v2
- name: Set up Maven Central Repo
uses: actions/setup-java@v1
with:
java-version: 11
- name: Set up Apache Maven Central
uses: actions/setup-java@v1
with: # running setup-java again overwrites the settings.xml
java-version: 11
server-id: sonatype-nexus-snapshots # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
Dismissed Show dismissed Hide dismissed
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Publish to Apache Maven Central
run: mvn clean deploy -P release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
5 changes: 4 additions & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v5
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
exempt-issue-labels: 'wip'
exempt-pr-labels: 'wip'
days-before-stale: 30
days-before-close: 5
labels-to-remove-when-stale: "Ready-to-Go"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 unknowIfGuestInDream
Copyright (c) 2023 unknowIfGuestInDream

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading