Skip to content

Commit 9ffc002

Browse files
committed
Update actions
1 parent 38fc7b6 commit 9ffc002

File tree

2 files changed

+24
-29
lines changed

2 files changed

+24
-29
lines changed

.github/workflows/basic.yaml

+5-9
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v4
1111
- name: Set up JDK 1.8
12-
uses: actions/setup-java@v1
12+
uses: actions/setup-java@v4
1313
with:
14-
java-version: 1.8
15-
- name: Cache Maven packages
16-
uses: actions/cache@v2
17-
with:
18-
path: ~/.m2
19-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
20-
restore-keys: ${{ runner.os }}-m2
14+
java-version: 8.0
15+
distribution: temurin
16+
cache: maven
2117
- name: Build with Maven
2218
run: ./mvnw -B install

.github/workflows/deploy.yaml

+19-20
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
1-
name: deploy
1+
name: Java CI with Maven Deploy
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [ main ]
76

87
jobs:
98
build:
109
runs-on: ubuntu-latest
1110
if: "!contains(github.event.head_commit.message, 'ci skip')"
1211

1312
steps:
14-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1514
- name: Set up JDK 1.8
16-
uses: actions/setup-java@v1
15+
uses: actions/setup-java@v4
1716
with:
18-
java-version: 1.8
19-
- name: Cache Maven packages
20-
uses: actions/cache@v2
21-
with:
22-
path: ~/.m2
23-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
24-
restore-keys: ${{ runner.os }}-m2
17+
java-version: 8.0
18+
distribution: temurin
19+
cache: maven
2520
- name: Build with Maven
21+
run: ./mvnw -B install
22+
- name: Deploy with Maven
2623
env:
27-
spring_username: ${{ secrets.BUILD_USER }}
28-
spring_password: ${{ secrets.BUILD_PASSWORD }}
29-
run: ./mvnw -B install -s .mvn/settings.xml
30-
- name: Deploy
31-
env:
32-
spring_username: ${{ secrets.BUILD_USER }}
33-
spring_password: ${{ secrets.BUILD_PASSWORD }}
34-
run: ./mvnw -B deploy -s .mvn/settings.xml -DskipTests
24+
spring_username: ${{ secrets.ARTIFACTORY_USERNAME }}
25+
spring_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
26+
sonatype_username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
27+
sonatype_password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
28+
signing_key: ${{ secrets.GPG_PRIVATE_KEY }}
29+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
30+
run: |
31+
echo "${signing_key}" > private.asc
32+
gpg --import --batch --no-tty private.asc
33+
./mvnw -B deploy -s .mvn/settings.xml -DskipTests

0 commit comments

Comments
 (0)