Skip to content

Commit 6738c92

Browse files
committed
Change samples build with workflows
- Relates #407
1 parent 32baac9 commit 6738c92

File tree

5 files changed

+40
-6
lines changed

5 files changed

+40
-6
lines changed

.github/workflows/ci-pr.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,27 @@ on:
66
jobs:
77
build:
88
runs-on: ubuntu-latest
9-
name: CI PR Build
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- nickname: linux jdk8
14+
java: 8
15+
disable-samples: true
16+
- nickname: linux jdk11
17+
java: 11
18+
disable-samples: false
19+
- nickname: linux jdk17
20+
java: 17
21+
disable-samples: false
22+
name: CI PR ${{ matrix.nickname }}
1023
steps:
1124
- uses: actions/checkout@v2
1225
- uses: actions/setup-java@v2
1326
with:
1427
distribution: adopt
1528
java-version: 8
16-
- run: ./mvnw -B package
29+
- name: Build
30+
env:
31+
DISABLE_SAMPLES: ${{ matrix.disable-samples }}
32+
run: ./mvnw -B package

.github/workflows/ci-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
echo JFROG_CLI_BUILD_NAME=spring-shell-main >> $GITHUB_ENV
3434
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
3535
- name: Build and Publish
36+
env:
37+
DISABLE_SAMPLES: true
3638
run: |
3739
jfrog rt mvn clean install -B -DskipTests
3840
jfrog rt build-publish

.github/workflows/ci.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,30 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
java: [ '8', '11', '17' ]
16-
name: CI Build ${{ matrix.java }}
15+
include:
16+
- nickname: linux jdk8
17+
java: 8
18+
disable-samples: true
19+
- nickname: linux jdk11
20+
java: 11
21+
disable-samples: false
22+
- nickname: linux jdk17
23+
java: 17
24+
disable-samples: false
25+
name: CI Build ${{ matrix.nickname }}
1726
steps:
1827
- uses: actions/checkout@v2
1928
- uses: actions/setup-java@v2
2029
with:
2130
distribution: adopt
2231
java-version: ${{ matrix.java }}
2332
cache: maven
24-
- run: ./mvnw -B package
33+
- name: Build
34+
env:
35+
DISABLE_SAMPLES: ${{ matrix.disable-samples }}
36+
run: ./mvnw -B package
2537
publish:
38+
if: github.repository_owner == 'spring-projects'
2639
needs: [build]
2740
name: Call Publish Snapshot
2841
uses: spring-projects/spring-shell/.github/workflows/ci-publish.yml@main

.github/workflows/release-milestone.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
-B
4444
echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
4545
- name: Build and Publish
46+
env:
47+
DISABLE_SAMPLES: true
4648
run: |
4749
jfrog rt build-clean
4850
jfrog rt mvn clean install \

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@
225225
<id>samples</id>
226226
<activation>
227227
<property>
228-
<name>!env.DISABLE_SAMPLES</name>
228+
<name>env.DISABLE_SAMPLES</name>
229+
<value>!true</value>
229230
</property>
230231
</activation>
231232
<modules>

0 commit comments

Comments
 (0)