File tree Expand file tree Collapse file tree 10 files changed +146
-74
lines changed
Expand file tree Collapse file tree 10 files changed +146
-74
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : ' Setup Maven'
2+ description : ' Installs maven and provides secrets'
3+ inputs :
4+ java-version :
5+ description : ' The Java version to use'
6+ required : true
7+ type : string
8+ maven-version :
9+ description : ' The Maven version to use'
10+ required : true
11+ type : string
12+ sonatype-username :
13+ description : ' The SONATYPE username'
14+ required : true
15+ type : string
16+ sonatype-password :
17+ description : ' The SONATYPE password'
18+ required : true
19+ type : string
20+ runs :
21+ using : ' composite'
22+ steps :
23+ - name : Setup Maven Action
24+ uses : s4u/setup-maven-action@v1.18.0
25+ with :
26+ java-version : ${{ inputs.java-version }}
27+ maven-version : ${{ inputs.maven-version }}
28+ - shell : bash
29+ run : |
30+ mkdir -p $HOME/.m2
31+ cp .github/settings.xml $HOME/.m2/settings.xml
32+ sed -i "s|\${SONATYPE_USERNAME}|${{ inputs.sonatype-username }}|g" $HOME/.m2/settings.xml
33+ sed -i "s|\${SONATYPE_PASSWORD}|${{ inputs.sonatype-password }}|g" $HOME/.m2/settings.xml
34+ cat $HOME/.m2/settings.xml
Original file line number Diff line number Diff line change 33 xmlns =' http://maven.apache.org/SETTINGS/1.0.0' xmlns : xsi =' http://www.w3.org/2001/XMLSchema-instance' >
44 <servers >
55 <server >
6- <id >ossrh </id >
7- <username >${OSSRH_USERNAME }</username >
8- <password >${OSSRH_PASSWORD }</password >
6+ <id >central </id >
7+ <username >${SONATYPE_USERNAME }</username >
8+ <password >${SONATYPE_PASSWORD }</password >
99 </server >
1010 </servers >
1111</settings >
Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+
6+ jobs :
7+ test :
8+ uses : ./.github/workflows/test.yml
9+ secrets : inherit
Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on :
4+ workflow_call :
5+ secrets :
6+ GPG_PASSPHRASE :
7+ required : true
8+ description : ' The GPG passphrase'
9+ SONATYPE_USERNAME :
10+ required : true
11+ description : ' The SONATYPE username'
12+ SONATYPE_PASSWORD :
13+ required : true
14+ description : ' The SONATYPE password'
15+
16+ jobs :
17+ deploy :
18+ runs-on : k8s-runner-linux
19+ steps :
20+ - uses : actions/checkout@v4
21+ - uses : ./.github/actions/setup-maven
22+ with :
23+ java-version : ' 8'
24+ maven-version : ' 3.6.3'
25+ sonatype-username : ${{ secrets.SONATYPE_USERNAME }}
26+ sonatype-password : ${{ secrets.SONATYPE_PASSWORD }}
27+ - env :
28+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
29+ run : |
30+ ./gen-gpg-key.sh
31+ sed -i "s/\${GPG_PASSPHRASE}/$GPG_PASSPHRASE/g" ./pom.xml
32+ cat ./pom.xml
33+ name : Generate GPG key
34+ - name : Deploy
35+ run : mvn deploy -Prelease -X
Original file line number Diff line number Diff line change 1+ name : CD
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
7+
8+ jobs :
9+ deploy :
10+ uses : ./.github/workflows/deploy.yml
11+ secrets : inherit
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ workflow_call :
5+ secrets :
6+ SONATYPE_USERNAME :
7+ required : true
8+ description : ' The SONATYPE username'
9+ SONATYPE_PASSWORD :
10+ required : true
11+ description : ' The SONATYPE password'
12+
13+ jobs :
14+ build :
15+ runs-on : k8s-runner-linux
16+ steps :
17+ - uses : actions/checkout@v4
18+ - uses : ./.github/actions/setup-maven
19+ with :
20+ java-version : ' 8'
21+ maven-version : ' 3.6.3'
22+ sonatype-username : ${{ secrets.SONATYPE_USERNAME }}
23+ sonatype-password : ${{ secrets.SONATYPE_PASSWORD }}
24+ - run : mvn verify
Original file line number Diff line number Diff line change 66.classpath
77.project
88.settings /
9- zephyrscale_result.json
9+ zephyrscale_result.json
10+ .vscode
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ if [[ -z " $GPG_PASSPHRASE " ]]; then
4+ echo " GPG_PASSPHRASE is not set. Please set it before running this script."
5+ exit 1
6+ fi
7+
38gpg --batch --gen-key << EOF
49Key-Type: 1
510Key-Length: 2048
@@ -8,7 +13,12 @@ Subkey-Length: 2048
813Name-Real: zephyrscale
914Name-Email: svc_zephyr_scale@smartbear.com
1015Expire-Date: 0
11- Passphrase: ${ GPG_PASSPHRASE}
16+ Passphrase: $GPG_PASSPHRASE
1217EOF
1318
14- gpg --keyserver hkps://keys.openpgp.org --send-keys $( gpg --with-colons --fingerprint | awk -F: ' $1 == "fpr" {print $10;}' )
19+ FINGERPRINT=$( gpg --with-colons --fingerprint | awk -F: ' $1 == "fpr" {print $10;}' )
20+ if [[ -z " $FINGERPRINT " ]]; then
21+ echo " No GPG key fingerprint found. Please check if the key was generated successfully."
22+ exit 1
23+ fi
24+ gpg --keyserver hkps://keys.openpgp.org --send-keys $FINGERPRINT
Original file line number Diff line number Diff line change 66
77 <groupId >com.smartbear</groupId >
88 <artifactId >zephyrscale-junit-integration</artifactId >
9- <version >2.0.1 </version >
9+ <version >2.0.3 </version >
1010 <packaging >jar</packaging >
1111
1212 <name >Zephyr Scale JUnit Integration</name >
8989 </gpgArguments >
9090 </configuration >
9191 </plugin >
92+ <plugin >
93+ <groupId >org.sonatype.central</groupId >
94+ <artifactId >central-publishing-maven-plugin</artifactId >
95+ <version >0.7.0</version >
96+ <extensions >true</extensions >
97+ <configuration >
98+ <publishingServerId >central</publishingServerId >
99+ </configuration >
100+ </plugin >
92101 </plugins >
93102 </build >
94103 </profile >
117126 <execution >
118127 <id >attach-sources</id >
119128 <phase >package</phase >
120- <goals ><goal >jar-no-fork</goal ></goals >
129+ <goals >
130+ <goal >jar-no-fork</goal >
131+ </goals >
121132 </execution >
122133 </executions >
123134 </plugin >
129140 <execution >
130141 <id >attach-javadocs</id >
131142 <phase >package</phase >
132- <goals ><goal >jar</goal ></goals >
143+ <goals >
144+ <goal >jar</goal >
145+ </goals >
133146 </execution >
134147 </executions >
135148 </plugin >
136149 </plugins >
137150 </build >
138151
139- <distributionManagement >
140- <repository >
141- <id >ossrh</id >
142- <name >Sonatype OSSRH Repository</name >
143- <url >https://oss.sonatype.org/service/local/staging/deploy/maven2/</url >
144- </repository >
145- </distributionManagement >
146-
147152 <properties >
148153 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
149154 </properties >
You can’t perform that action at this time.
0 commit comments