Skip to content

Commit a45e0ab

Browse files
committed
Change ci workflow to use gradle
- Relates #470
1 parent 39c4519 commit a45e0ab

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,40 @@ jobs:
2323
with:
2424
distribution: adopt
2525
java-version: ${{ matrix.java }}
26-
cache: maven
26+
cache: gradle
2727
- name: Build
2828
env:
2929
DISABLE_SAMPLES: ${{ matrix.disable-samples }}
30-
run: ./mvnw -B package
30+
run: ./gradlew build
3131
publish:
3232
if: github.repository_owner == 'spring-projects'
3333
needs: [build]
34-
name: Call Publish Snapshot
35-
uses: spring-projects/spring-shell/.github/workflows/ci-publish.yml@main
36-
secrets:
37-
jfArtifactorySpring: ${{ secrets.JF_ARTIFACTORY_SPRING }}
34+
steps:
35+
- uses: actions/checkout@v2
36+
- uses: actions/setup-java@v2
37+
with:
38+
distribution: adopt
39+
java-version: 17
40+
cache: gradle
41+
- uses: jfrog/setup-jfrog-cli@v2
42+
with:
43+
version: 2.21.5
44+
env:
45+
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
46+
- name: Configure JFrog Cli
47+
run: |
48+
jf rt gradlec \
49+
--use-wrapper \
50+
--deploy-ivy-desc=false \
51+
--server-id-resolve repo.spring.io \
52+
--server-id-deploy repo.spring.io \
53+
--repo-resolve snapshot \
54+
--repo-deploy snapshot
55+
echo JFROG_CLI_BUILD_NAME=spring-shell-main >> $GITHUB_ENV
56+
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
57+
- name: Build and Publish
58+
env:
59+
DISABLE_SAMPLES: true
60+
run: |
61+
jf rt gradle build distZip artifactoryPublish
62+
jf rt build-publish

0 commit comments

Comments
 (0)