Skip to content

Commit c833538

Browse files
committed
Add GitHub actions for CI builds and snapshot deployment.
See spring-projects/spring-data-build#2764
1 parent 7b4653e commit c833538

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions: read-all
8+
9+
jobs:
10+
build-java:
11+
name: Build project
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- name: Setup Java and Maven
16+
uses: spring-projects/spring-data-release/actions/setup-maven@main
17+
with:
18+
java-version: 'main'
19+
develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}'
20+
- name: Build
21+
run: ./mvnw -Ddevelocity.cache.local.enabled=false -Ddevelocity.cache.remove.enabled=false -Pwith-bom-client verify -B -U

.github/workflows/snapshots.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Snapshots
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions: read-all
8+
9+
jobs:
10+
verify:
11+
name: Verify artifacts with BOM client
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- name: Setup Java and Maven
16+
uses: spring-projects/spring-data-release/actions/setup-maven@main
17+
with:
18+
java-version: 'main'
19+
develocity-access-key: ''
20+
- name: Verify Artifacts with BOM client
21+
run: ./mvnw -Ddevelocity.cache.local.enabled=false -Ddevelocity.cache.remove.enabled=false -Pwith-bom-client verify -B -U
22+
build-snapshots:
23+
name: Build and deploy snapshots
24+
runs-on: ubuntu-latest
25+
needs: verify
26+
steps:
27+
- uses: actions/checkout@v6
28+
- name: Setup Java and Maven
29+
uses: spring-projects/spring-data-release/actions/setup-maven@main
30+
with:
31+
java-version: 'main'
32+
develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}'
33+
- name: Deploy to Artifactory
34+
if: ${{ github.repository_owner == 'spring-projects' }}
35+
uses: spring-projects/spring-data-release/actions/maven-artifactory-deploy@main
36+
with:
37+
build-name: 'spring-data-bom'
38+
additional-options: '-Ddevelocity.cache.local.enabled=false -Ddevelocity.cache.remove.enabled=false'
39+
username: '${{ secrets.ARTIFACTORY_USERNAME }}'
40+
password: '${{ secrets.ARTIFACTORY_PASSWORD }}'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ target
1111
.classpath
1212
.idea
1313
credentials.yml
14+
.mvn/.develocity/

0 commit comments

Comments
 (0)