Skip to content

Commit

Permalink
发布 1.1.1 版本,升级依赖版本,替换 log4j 为 logback
Browse files Browse the repository at this point in the history
  • Loading branch information
abel533 committed Apr 8, 2022
1 parent 9490efc commit f712293
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 34 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish package to the Maven Central Repository
on:
push:
tags: [ "*" ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish package
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P release clean deploy
18 changes: 18 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Maven verify
on:
pull_request:
types: [ opened, reopened, edited ]
push:
branches: [ develop, master ]
jobs:
mvn_verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Run the Maven verify phase
run: mvn --batch-mode --update-snapshots verify
38 changes: 27 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>io.mybatis</groupId>
<artifactId>mybatis-provider</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>

<name>MyBatis Provider</name>
<description>MyBatis Provider 扩展</description>
Expand Down Expand Up @@ -57,10 +57,10 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<argLine>-Dfile.encoding=UTF-8</argLine>

<logback.version>1.2.11</logback.version>
<mybatis.version>3.5.9</mybatis.version>
<lombok.version>1.18.22</lombok.version>
<hsqldb.version>2.5.1</hsqldb.version>
<log4j.version>1.2.17</log4j.version>
<hsqldb.version>2.5.2</hsqldb.version>
<junit.version>4.13</junit.version>
</properties>

Expand All @@ -79,8 +79,8 @@
<artifactId>hsqldb</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -111,9 +111,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -157,7 +157,7 @@
</pluginRepositories>
</profile>
<profile>
<id>deploy-oss-maven</id>
<id>release</id>
<build>
<plugins>
<!-- Source -->
Expand Down Expand Up @@ -206,16 +206,32 @@
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<argument>--pinentry-mode</argument>
<argument>loopback</argument>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>oss</id>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>oss</id>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
Expand Down
22 changes: 0 additions & 22 deletions src/test/resources/log4j.properties

This file was deleted.

10 changes: 10 additions & 0 deletions src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="debug">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
2 changes: 1 addition & 1 deletion src/test/resources/mybatis-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="logImpl" value="LOG4J"/>
<setting name="logImpl" value="SLF4J"/>
<setting name="cacheEnabled" value="true"/>
<setting name="mapUnderscoreToCamelCase" value="true"/>
<setting name="aggressiveLazyLoading" value="false"/>
Expand Down

0 comments on commit f712293

Please sign in to comment.