Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 3a355ec

Browse files
committed
added release workflow
1 parent d0fa21a commit 3a355ec

File tree

1 file changed

+45
-6
lines changed

1 file changed

+45
-6
lines changed

.circleci/config.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
keys:
121121
- dependencies-{{ checksum "pom.xml" }}
122122
- run:
123-
name: Build and Deploy Snapshot to Sonatype Nexus
123+
name: Deploy Snapshot to Sonatype Nexus
124124
command: >-
125125
mvn --batch-mode deploy
126126
-DskipUnitTests=true
@@ -130,12 +130,45 @@ jobs:
130130
-Dossrh.password=$OSSRH_PASSWORD
131131
-P deploy-snapshot
132132
133+
build-and-deploy-release:
134+
working_directory: ~/work
135+
docker:
136+
- image: caaqe/webtester2-build-environment
137+
steps:
138+
- checkout
139+
- restore_cache:
140+
keys:
141+
- dependencies-{{ checksum "pom.xml" }}
142+
- run:
143+
name: Set Build Tools Version
144+
command: |
145+
VERSION=$(echo $CIRCLE_TAG | cut -d 'v' -f 2)
146+
cd webtester-build-tools
147+
mvn versions:set versions:commit -DnewVersion=$VERSION
148+
- run:
149+
name: Set Project Version
150+
command: |
151+
VERSION=$(echo $CIRCLE_TAG | cut -d 'v' -f 2)
152+
mvn versions:set versions:commit -DnewVersion=$VERSION
153+
- run:
154+
name: Deploy Release to Sonatype Nexus
155+
command: >-
156+
mvn --batch-mode deploy
157+
-DskipUnitTests=true
158+
-DskipIntegrationTests=true
159+
-Dgpg.passphrase=$GPG_PASSPHRASE
160+
-Dossrh.username=$OSSRH_USERNAME
161+
-Dossrh.password=$OSSRH_PASSWORD
162+
-P deploy-release
163+
133164
workflows:
134165
version: 2
135166
ci-build:
136167
jobs:
137-
- compile
138-
168+
- compile:
169+
filters:
170+
tags:
171+
ignore: /.*/
139172
- checkstyle:
140173
requires:
141174
- compile
@@ -145,7 +178,6 @@ workflows:
145178
- pmd:
146179
requires:
147180
- compile
148-
149181
- unit-tests:
150182
requires:
151183
- checkstyle
@@ -156,12 +188,10 @@ workflows:
156188
- checkstyle
157189
- findbugs
158190
- pmd
159-
160191
- documentation:
161192
requires:
162193
- unit-tests
163194
- integration-tests
164-
165195
- build-and-deploy-snapshot:
166196
requires:
167197
- documentation
@@ -170,3 +200,12 @@ workflows:
170200
only:
171201
- master
172202
- releases/*.*.x
203+
204+
release:
205+
jobs:
206+
- build-and-deploy-release:
207+
filters:
208+
tags:
209+
only: /^v.*/
210+
branches:
211+
ignore: /.*/

0 commit comments

Comments
 (0)