Skip to content

Commit ad9cab1

Browse files
[RM] Support #86256. Added workflow steps to publish snapshots and detect unwelcomed words
1 parent 0634233 commit ad9cab1

File tree

4 files changed

+92
-12
lines changed

4 files changed

+92
-12
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build and Publish Snapshot
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Set up JDK 11
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: 11
18+
distribution: liberica
19+
20+
- name: Setup Gradle
21+
uses: gradle/actions/setup-gradle@v4
22+
with:
23+
gradle-version: wrapper
24+
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Prepare a tool to detect unwelcome words
29+
uses: actions/checkout@v4
30+
with:
31+
repository: exactpro/ci-github-action
32+
ref: master
33+
token: ${{ secrets.PAT_CI_ACTION }}
34+
path: ci-github-unwelcome-words-action
35+
36+
- name: Run CI action to detect unwelcome words
37+
uses: ./ci-github-unwelcome-words-action
38+
with:
39+
ref: ${{ github.sha }}
40+
41+
- name: Build project and run tests
42+
run: ./gradlew clean build
43+
44+
- name: Store test results
45+
if: always()
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: reports
49+
path: |
50+
**/build/reports/
51+
**/build/test-results/
52+
53+
- name: Upload Archives
54+
env:
55+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
56+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
57+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
58+
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}
59+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
60+
run: |
61+
./gradlew closeAndReleaseStagingRepositories publish \
62+
-Psigning.keyId=$SIGNING_KEY_ID \
63+
-Psigning.secretKey=$SIGNING_SECRET_KEY \
64+
-Psigning.password=$SIGNING_PASSWORD \
65+
-PossrhUsername=$OSSRH_USERNAME \
66+
-PossrhPassword=$OSSRH_PASSWORD

.github/workflows/ci-workflow.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,21 @@ jobs:
2222
- name: Checkout repository
2323
uses: actions/checkout@v4
2424

25+
- name: Prepare a tool to detect unwelcome words
26+
uses: actions/checkout@v4
27+
with:
28+
repository: exactpro/ci-github-action
29+
ref: rm86256
30+
token: ${{ secrets.PAT_CI_ACTION }}
31+
path: ci-github-unwelcome-words-action
32+
33+
- name: Run CI action to detect unwelcome words
34+
uses: ./ci-github-unwelcome-words-action
35+
with:
36+
ref: ${{ github.sha }}
37+
2538
- name: Build project and run tests
26-
run: ./gradlew clean build
39+
run: ./gradlew clean build -PreleaseMode
2740

2841
- name: Store test results
2942
if: always()
@@ -34,7 +47,7 @@ jobs:
3447
**/build/reports/
3548
**/build/test-results/
3649
37-
- name: Upload archives
50+
- name: Upload Archives
3851
env:
3952
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
4053
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
@@ -43,6 +56,7 @@ jobs:
4356
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
4457
run: |
4558
./gradlew closeAndReleaseStagingRepositories publish \
59+
-PreleaseMode \
4660
-Psigning.keyId=$SIGNING_KEY_ID \
4761
-Psigning.secretKey=$SIGNING_SECRET_KEY \
4862
-Psigning.password=$SIGNING_PASSWORD \

build.gradle

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ allprojects {
2727
genDir = file("${srcDir}/gen")
2828
genJavaDir = file("${genDir}/java")
2929

30-
incremental_build = project.hasProperty('i')
3130
sonatype_publish = project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')
31+
isReleaseMode = project.hasProperty('releaseMode')
3232

3333
// Set defaults
3434
if (!project.hasProperty("revision")) {
@@ -42,10 +42,13 @@ allprojects {
4242
}
4343
//Lib versions
4444
version_slf4j = '1.7.5'
45+
46+
quickfixjVersionSuffix = (isReleaseMode)? '': '-SNAPSHOT'
47+
quickfixjVersion = "${quickfixjPrefixVersion}.${exactproVersion}${quickfixjVersionSuffix}"
4548
}
4649
}
4750

48-
version = "${quickfixjPrefixVersion}.${exactproVersion}"
51+
version = quickfixjVersion
4952

5053
subprojects {
5154
apply plugin: 'eclipse'
@@ -57,6 +60,7 @@ subprojects {
5760
}
5861

5962
group = 'com.exactpro.quickfixj'
63+
version = quickfixjVersion
6064

6165
sourceCompatibility = JavaVersion.VERSION_1_7 //Java version compatibility to use when compiling Java source.
6266
targetCompatibility = JavaVersion.VERSION_1_7 //Java version to generate classes for.
@@ -150,9 +154,9 @@ subprojects {
150154

151155
developers {
152156
developer {
153-
id = 'Nikita-Smirnov-Exactpro'
154-
name = 'Nikita Smirnov'
155-
email = 'nikita.smirnov@exactprosystems.com'
157+
id.set('sf_devs')
158+
name.set('sf_devs')
159+
email.set('sf_devs@exactpro.com')
156160
}
157161
}
158162
}

quickfixj-core/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@ sourceSets {
3535
}
3636

3737
dependencies {
38-
if (incremental_build) {
39-
implementation 'com.exactpro.quickfixj:quickfixj-code-generator:1.6.0.1-SNAPSHOT'
40-
} else {
41-
implementation project(':quickfixj-codegenerator')
42-
}
38+
implementation project(':quickfixj-codegenerator')
4339

4440
implementation 'com.exactpro.mina:apache-mina-core:2.0.9.1'
4541

0 commit comments

Comments
 (0)