Skip to content

Commit db6e68f

Browse files
christophstroblmp911de
authored andcommitted
Add GitHub actions for CI builds and snapshot deployment.
See spring-projects/spring-data-build#2764
1 parent 2a1532d commit db6e68f

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main, 5.0.x, 4.5.x, 'issue/**' ]
7+
8+
permissions: read-all
9+
10+
jobs:
11+
build-java:
12+
strategy:
13+
matrix:
14+
java-version: [ base, main ]
15+
mongodb-version: [ 'latest', '8.2', '8.0', '7.0' ]
16+
name: Build project
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v6
20+
- name: Setup Java and Maven
21+
uses: spring-projects/spring-data-release/actions/setup-maven@main
22+
with:
23+
java-version: ${{ matrix.java-version }}
24+
develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}'
25+
- name: Setup MongoDB Server
26+
uses: spring-projects/spring-data-release/actions/setup-mongodb@main
27+
with:
28+
version: '${{ matrix.mongodb-version }}'
29+
replica-set: 'rs0'
30+
- name: Build
31+
uses: spring-projects/spring-data-release/actions/maven-build@main

.github/workflows/snapshots.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Snapshots
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main, 5.0.x, 4.5.x, 'issue/**' ]
7+
8+
permissions: read-all
9+
10+
jobs:
11+
build-snapshots:
12+
name: Build and deploy snapshots
13+
if: ${{ github.repository_owner == 'spring-projects' }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v6
17+
- name: Setup Java and Maven
18+
uses: spring-projects/spring-data-release/actions/setup-maven@main
19+
with:
20+
develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}'
21+
- name: Setup MongoDB Server
22+
uses: spring-projects/spring-data-release/actions/setup-mongodb@main
23+
with:
24+
replica-set: 'rs0'
25+
- name: Deploy to Artifactory
26+
uses: spring-projects/spring-data-release/actions/maven-artifactory-deploy@main
27+
with:
28+
build-name: 'spring-data-mongodb'
29+
username: '${{ secrets.ARTIFACTORY_USERNAME }}'
30+
password: '${{ secrets.ARTIFACTORY_PASSWORD }}'

0 commit comments

Comments
 (0)