Skip to content

Commit 7a69a3e

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

File tree

3 files changed

+85
-3
lines changed

3 files changed

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

3030
incremental_build = project.hasProperty('i')
3131
sonatype_publish = project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')
32+
isReleaseMode = project.hasProperty('releaseMode')
3233

3334
// Set defaults
3435
if (!project.hasProperty("revision")) {
@@ -42,10 +43,13 @@ allprojects {
4243
}
4344
//Lib versions
4445
version_slf4j = '1.7.5'
46+
47+
quickfixjVersionSuffix = (isReleaseMode)? '': '-SNAPSHOT'
48+
quickfixjVersion = "${quickfixjPrefixVersion}.${exactproVersion}${quickfixjVersionSuffix}"
4549
}
4650
}
4751

48-
version = "${quickfixjPrefixVersion}.${exactproVersion}"
52+
version = quickfixjVersion
4953

5054
subprojects {
5155
apply plugin: 'eclipse'
@@ -57,6 +61,7 @@ subprojects {
5761
}
5862

5963
group = 'com.exactpro.quickfixj'
64+
version = quickfixjVersion
6065

6166
sourceCompatibility = JavaVersion.VERSION_1_7 //Java version compatibility to use when compiling Java source.
6267
targetCompatibility = JavaVersion.VERSION_1_7 //Java version to generate classes for.

0 commit comments

Comments
 (0)