Update repository resolution order #320
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '.github/**' | |
| jobs: | |
| # build and test, then upload logs if failure | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Spring Gradle Build Action | |
| uses: spring-io/spring-gradle-build-action@v2 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Tar Build Logs | |
| if: ${{ failure() }} | |
| run: | | |
| mkdir -p build | |
| tar \ | |
| -zc \ | |
| --ignore-failed-read \ | |
| --file build/buildlogs.tar.gz \ | |
| */build/reports \ | |
| */*/build/reports | |
| - name: Upload Build Logs | |
| if: ${{ failure() }} | |
| uses: actions/[email protected] | |
| with: | |
| name: buildlogs | |
| path: build/buildlogs.tar.gz | |
| # if build job succeed, build without tests and publish | |
| publish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Spring Gradle Build Action | |
| uses: spring-io/spring-gradle-build-action@v2 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Build with Gradle | |
| run: ./gradlew -Dmaven.repo.local=$(pwd)/deployment-repository -x test clean build publishToMavenLocal | |
| - name: Deploy | |
| uses: spring-io/[email protected] | |
| with: | |
| uri: 'https://repo.spring.io' | |
| username: ${{ secrets.ARTIFACTORY_USERNAME }} | |
| password: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
| build-name: 'spring-statemachine-main' | |
| repository: 'libs-snapshot-local' | |
| folder: 'deployment-repository' |