Skip to content

Commit

Permalink
✨ 更新 GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
li-xunhuan committed Sep 21, 2023
1 parent b1b21e7 commit a58d1ca
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 34 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,18 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Apache Maven Central
uses: actions/setup-java@v2
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
distribution: 'zulu'
cache: 'maven'
java-version: 8
server-id: oss
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-passphrase: MAVEN_GPG_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Publish to the Maven Central Repository
run: |
chmod +x ./deploy.sh
Expand Down
34 changes: 12 additions & 22 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,25 @@ jobs:
name: build on java8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'zulu'
cache: 'maven'
java-version: 8
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn package
buildOnJava11:
name: build on java11
buildOnJava21:
name: build on java21
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache local Maven repository
uses: actions/cache@v2
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
distribution: 'zulu'
cache: 'maven'
java-version: 21
- name: Build with Maven
run: mvn package
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<jfinal.version>5.1.0</jfinal.version>
<tinylog.version>2.6.2</tinylog.version>
<junit-jupiter.version>5.9.3</junit-jupiter.version>
<lombok.version>1.18.26</lombok.version>
<lombok.version>1.18.30</lombok.version>
</properties>

<modules>
Expand Down

0 comments on commit a58d1ca

Please sign in to comment.