chore: tidy up repo settings (#246)
Signed-off-by: tison <wander4096@gmail.com>
This commit is contained in:
parent
e55dc9e7f8
commit
e90e6b53ac
@ -1,15 +1,9 @@
|
|||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*.{groovy, java, kt, xml}]
|
[*.{groovy,java,kt,xml}]
|
||||||
#缩进风格:空格
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
#缩进大小
|
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
#换行符lf
|
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
#字符集utf-8
|
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
#是否删除行尾的空格
|
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
#是否在文件的最后插入一个空行
|
insert_final_newline = true
|
||||||
insert_final_newline = true
|
|
||||||
|
0
.github/ISSUE_TEMPLATE/bug.md
vendored
0
.github/ISSUE_TEMPLATE/bug.md
vendored
0
.github/ISSUE_TEMPLATE/question.md
vendored
0
.github/ISSUE_TEMPLATE/question.md
vendored
0
.github/ISSUE_TEMPLATE/suggest.md
vendored
0
.github/ISSUE_TEMPLATE/suggest.md
vendored
@ -1,12 +0,0 @@
|
|||||||
<!-- 请确保你已经阅读并理解了贡献指南 -->
|
|
||||||
|
|
||||||
### Ⅰ. 描述这个 PR 做了什么
|
|
||||||
|
|
||||||
### Ⅱ. 这个 pull request 是否修复了一个问题?
|
|
||||||
<!-- 如果是,请在下一行添加“fix #xxx”,例如 fix #97。-->
|
|
||||||
|
|
||||||
### Ⅲ. 为什么不需要添加测试用例(单元测试/集成测试)?
|
|
||||||
|
|
||||||
### Ⅳ. 描述如何验证它
|
|
||||||
|
|
||||||
### Ⅴ. 评审的特别说明
|
|
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@ -1,57 +1,42 @@
|
|||||||
#
|
|
||||||
# Copyright 2009-2021 the original author or authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
name: Java CI
|
name: Java CI
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java: [ 8, 11, 17, 21]
|
java: [ 8, 11, 17, 21]
|
||||||
distribution: [ 'adopt' ]
|
distribution: [ 'adopt' ]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 4
|
max-parallel: 4
|
||||||
name: Test JDK ${{ matrix.java }}
|
|
||||||
|
|
||||||
|
name: Test JDK ${{ matrix.java }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@v4
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@main
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
- name: Cache local Maven repository
|
- name: Cache local Maven repository
|
||||||
uses: actions/cache@main
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-m2
|
${{ runner.os }}-m2
|
||||||
- name: Chmod
|
|
||||||
run: chmod +x mvnw
|
|
||||||
- name: Test with Maven
|
- name: Test with Maven
|
||||||
if: ${{ matrix.java == '8' }}
|
if: ${{ matrix.java == '8' }}
|
||||||
run: ./mvnw test -B -Dmaven.test.skip=false
|
run: ./mvnw test -B -Dmaven.test.skip=false
|
||||||
- name: Test with Maven
|
- name: Test with Maven
|
||||||
if: ${{ matrix.java != '8' }}
|
if: ${{ matrix.java != '8' }}
|
||||||
run: ./mvnw test -B -Dmaven.test.skip=false -DargLine="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED"
|
run: ./mvnw test -B -Dmaven.test.skip=false -DargLine="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED"
|
||||||
|
|
||||||
- name: Maven Build
|
- name: Maven Build
|
||||||
run: ./mvnw install -B -V
|
run: ./mvnw install -B -V
|
||||||
- name: Java Doc
|
- name: Java Doc
|
||||||
|
40
.github/workflows/release.yml
vendored
40
.github/workflows/release.yml
vendored
@ -1,35 +1,17 @@
|
|||||||
#
|
|
||||||
# Copyright 2009-2021 the original author or authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
name: Publish package to the Maven Central Repository
|
name: Publish package to the Maven Central Repository
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@main
|
uses: actions/checkout@v4
|
||||||
- name: Install Java and Maven
|
- name: Install Java and Maven
|
||||||
uses: actions/setup-java@main
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: 8
|
java-version: 8
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
@ -37,19 +19,19 @@ jobs:
|
|||||||
server-username: MAVEN_USERNAME
|
server-username: MAVEN_USERNAME
|
||||||
server-password: MAVEN_PASSWORD
|
server-password: MAVEN_PASSWORD
|
||||||
- name: Cache local Maven repository
|
- name: Cache local Maven repository
|
||||||
uses: actions/cache@main
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-m2
|
${{ runner.os }}-m2
|
||||||
- id: install-secret-key
|
- name: Install GPG secret key
|
||||||
name: Install GPG secret key
|
run: cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
|
||||||
run: |
|
|
||||||
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
|
|
||||||
- name: Publish package
|
- name: Publish package
|
||||||
run: |
|
run: >
|
||||||
mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} clean deploy -Dmaven.test.skip=true -Dmaven.javadoc.skip=false -Dgpg.skip=false
|
./mvnw --batch-mode clean deploy
|
||||||
|
-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
-Dmaven.test.skip=true -Dmaven.javadoc.skip=false -Dgpg.skip=false
|
||||||
env:
|
env:
|
||||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
||||||
|
27
.github/workflows/sync2gitee.yml
vendored
27
.github/workflows/sync2gitee.yml
vendored
@ -1,27 +0,0 @@
|
|||||||
# 通过 Github action, 在仓库的每一次 commit 后自动同步到 Gitee 上
|
|
||||||
# 临时修改为手动触发,等待同步完成后再修改为自动触发
|
|
||||||
name: Mirror the Github organization repos to Gitee
|
|
||||||
on: workflow_dispatch
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
repo-sync:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Mirror the Github organization repos to Gitee.
|
|
||||||
uses: Yikun/hub-mirror-action@master
|
|
||||||
with:
|
|
||||||
# 必选,需要同步的 Github 这里记住选择的是仓库 或者账号 而不是具体的项目
|
|
||||||
src: github/CodePhiliaX
|
|
||||||
# 必选,需要同步到的 Gitee 这里记住选择的是仓库 或者账号 而不是具体的项目
|
|
||||||
dst: gitee/fastexcel
|
|
||||||
# 必选,Gitee公钥对应的私钥,https://gitee.com/profile/sshkeys
|
|
||||||
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
|
|
||||||
# 必选,Gitee对应的用于创建仓库的token,https://gitee.com/profile/personal_access_tokens
|
|
||||||
dst_token: ${{ secrets.GITEE_TOKEN }}
|
|
||||||
# 如果是组织,指定组织即可,默认为用户 user
|
|
||||||
account_type: org
|
|
||||||
# 需要同步的仓库里面的项目
|
|
||||||
static_list: "fastexcel"
|
|
Loading…
x
Reference in New Issue
Block a user