Skip to content

Commit 0a4c36a

Browse files
committed
CI: added release workflow
1 parent 0ac583f commit 0a4c36a

File tree

3 files changed

+40
-50
lines changed

3 files changed

+40
-50
lines changed

.circleci/config.yml

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,21 @@ commands:
8585
key: maven-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/maven_cache_seed" }}
8686
paths:
8787
- ~/.m2/repository
88+
config_gpg:
89+
steps:
90+
- run:
91+
name: Configure GPG
92+
command: echo $GPG_PRIVATE_KEY | base64 --decode | gpg --batch --no-tty --import --yes
93+
deploy:
94+
steps:
95+
- run:
96+
name: Deploy to Apache Maven Central
97+
command: mvn -s .circleci/maven-release-settings.xml -DskipTests deploy
98+
release:
99+
steps:
100+
- run:
101+
name: Release to Apache Maven Central
102+
command: mvn -Dmaven.test.skip=true nexus-staging:release
88103

89104
executors:
90105
j17:
@@ -155,13 +170,21 @@ jobs:
155170
- checkout
156171
- load_cache
157172
- mvn-info
158-
- run:
159-
name: Add GPG key
160-
command: echo $GPG_PRIVATE_KEY | base64 --decode | gpg --batch --no-tty --import --yes
161-
- run:
162-
name: Deploy to Apache Maven Central
163-
command: mvn -s .circleci/maven-release-settings.xml -DskipTests deploy
173+
- config_gpg
174+
- deploy
164175
- store_cache
176+
release:
177+
executor: 'j17'
178+
steps:
179+
- timeout
180+
- checkout
181+
- load_cache
182+
- mvn-info
183+
- config_gpg
184+
- deploy
185+
- release
186+
- store_cache
187+
165188
workflows:
166189
test-adb-version:
167190
when:
@@ -218,4 +241,13 @@ workflows:
218241
tags:
219242
only: /^deploy.*/
220243
branches:
221-
ignore: /.*/
244+
ignore: /.*/
245+
release:
246+
jobs:
247+
- deploy:
248+
context: java-release
249+
filters:
250+
tags:
251+
only: /^release.*/
252+
branches:
253+
ignore: /.*/

.github/workflows/maven-release.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<plugin>
9393
<groupId>org.sonatype.plugins</groupId>
9494
<artifactId>nexus-staging-maven-plugin</artifactId>
95-
<version>1.6.13</version>
95+
<version>1.7.0</version>
9696
<extensions>true</extensions>
9797
<configuration>
9898
<serverId>ossrh</serverId>

0 commit comments

Comments
 (0)