File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,11 +37,25 @@ jobs:
3737 run : ./gradlew check --no-daemon
3838
3939 - name : Build coverage report
40+ if : github.ref == 'refs/heads/dw3' && github.event_name != 'pull_request'
4041 run : ./gradlew jacocoTestReport --no-daemon
4142
4243 - uses : codecov/codecov-action@v4
44+ if : github.ref == 'refs/heads/dw3' && github.event_name != 'pull_request'
4345 with :
4446 files : build/reports/jacoco/test/jacocoTestReport.xml
4547 flags : LINUX
4648 fail_ci_if_error : true
4749 token : ${{ secrets.CODECOV_TOKEN }}
50+
51+ # publish snapshot after successful tests
52+ publish :
53+ if : github.ref == 'refs/heads/dw3' && github.event_name != 'pull_request'
54+ needs : build
55+ uses : ./.github/workflows/publish-snapshot.yml
56+
57+ # run examples with published snapshot
58+ examples :
59+ if : github.ref == 'refs/heads/dw3' && github.event_name != 'pull_request'
60+ needs : publish
61+ uses : ./.github/workflows/examples-CI.yml
Original file line number Diff line number Diff line change 11name : Examples CI
22
33on :
4- push :
5- pull_request :
4+ workflow_call :
65
76jobs :
87 build :
Original file line number Diff line number Diff line change 1+ name : Publish snapshot
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ publish :
8+ name : Publish snapshot
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : read
12+ packages : write
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - name : Set up JDK
18+ uses : actions/setup-java@v4
19+ with :
20+ distribution : ' zulu'
21+ java-version : 17
22+
23+ - name : Setup Gradle
24+ uses : gradle/actions/setup-gradle@v3
25+
26+ - name : Build without tests
27+ run : |
28+ chmod +x gradlew
29+ ./gradlew build -x check --no-daemon
30+
31+ - name : Publish
32+ env :
33+ ORG_GRADLE_PROJECT_sonatypeUser : ${{ secrets.SONATYPE_USERNAME }}
34+ ORG_GRADLE_PROJECT_sonatypePassword : ${{ secrets.SONATYPE_PASSWORD }}
35+ run : ./gradlew publishToSonatype
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ wrapper {
1111description = ' Dropwizard guicey examples'
1212
1313ext {
14- guiceyBom = ' 6.3.0 '
14+ guiceyBom = ' 6.3.2-SNAPSHOT '
1515 dwVersion = ' 3.0.13'
1616}
1717
@@ -27,7 +27,18 @@ subprojects {
2727 resolutionStrategy. cacheChangingModulesFor 0 , ' seconds'
2828 }
2929
30- repositories { mavenLocal(); mavenCentral()}
30+ repositories {
31+ mavenLocal()
32+ mavenCentral()
33+ maven {
34+ name = ' Central Portal Snapshots'
35+ url = ' https://central.sonatype.com/repository/maven-snapshots/'
36+ mavenContent {
37+ snapshotsOnly()
38+ includeGroupAndSubgroups(' ru.vyarus' )
39+ }
40+ }
41+ }
3142 dependencies {
3243 implementation platform(" ru.vyarus.guicey:guicey-bom:$guiceyBom " )
3344
You can’t perform that action at this time.
0 commit comments