Skip to content

Commit 2f29eb3

Browse files
author
Dave Syer
committed
Update actions
1 parent 38fc7b6 commit 2f29eb3

File tree

2 files changed

+20
-27
lines changed

2 files changed

+20
-27
lines changed

.github/workflows/basic.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,11 @@ 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:
1414
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
15+
cache: maven
2116
- name: Build with Maven
2217
run: ./mvnw -B install

.github/workflows/deploy.yaml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
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:
1817
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
18+
cache: maven
2519
- name: Build with Maven
20+
run: ./mvnw -B install
21+
- name: Deploy with Maven
2622
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
23+
spring_username: ${{ secrets.ARTIFACTORY_USERNAME }}
24+
spring_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
25+
sonatype_username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
26+
sonatype_password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
27+
signing_key: ${{ secrets.GPG_PRIVATE_KEY }}
28+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
29+
run: |
30+
echo "${signing_key}" > private.asc
31+
gpg --import --batch --no-tty private.asc
32+
./mvnw -B deploy -s .mvn/settings.xml -DskipTests

0 commit comments

Comments
 (0)