Skip to content

CI

CI #528

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**'
env:
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 }}
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@v2
- uses: actions/setup-java@v2
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@v2
- uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 17
cache: gradle
- uses: jfrog/setup-jfrog-cli@v2
with:
version: 2.21.5
env:
JF_ARTIFACTORY_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-30x >> $GITHUB_ENV
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
- name: Build and Publish
run: |
jf rt gradle build distZip artifactoryPublish
jf rt build-publish