Skip to content

Commit 3f3bb07

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

File tree

3 files changed

+88
-3
lines changed

3 files changed

+88
-3
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-th2/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: 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)