-
Notifications
You must be signed in to change notification settings - Fork 395
65 lines (63 loc) · 1.97 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- nickname: linux jdk17
java: 17
name: CI Build ${{ matrix.nickname }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: adopt
java-version: ${{ matrix.java }}
cache: gradle
- name: Build
run: ./gradlew build
publish:
runs-on: ubuntu-latest
if: github.repository_owner == 'spring-projects'
needs: [build]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
cache: gradle
- uses: jfrog/setup-jfrog-cli@v3
with:
version: 2.21.5
env:
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
- name: Configure JFrog Cli
run: |
jf rt gradlec \
--use-wrapper \
--uses-plugin \
--deploy-ivy-desc=false \
--server-id-resolve repo.spring.io \
--server-id-deploy repo.spring.io \
--repo-resolve snapshot \
--repo-deploy snapshot
echo JFROG_CLI_BUILD_NAME=spring-shell-32x >> $GITHUB_ENV
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
- name: Build and Publish
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
run: |
jf rt gradle build distZip artifactoryPublish
jf rt build-publish