Skip to content

Commit 5031da9

Browse files
committed
1
1 parent 7131256 commit 5031da9

File tree

2 files changed

+24
-31
lines changed

2 files changed

+24
-31
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Release scylla-cdc-java
33
on:
44
workflow_dispatch:
55
inputs:
6-
dryrun:
6+
dry-run:
77
type: boolean
8-
description: 'dryrun: run without pushing SCM changes to upstream'
8+
description: 'dry-run: run without pushing SCM changes to upstream'
99
default: false
1010

1111
skip-tests:
@@ -77,14 +77,16 @@ jobs:
7777
SONATYPE_TOKEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USERNAME }}
7878
SONATYPE_TOKEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
7979
run: |
80-
if [[ "${{ inputs.dryrun }}" == "true" ]]; then
81-
MAVEN_OPTS="${MAVEN_OPTS} -DdryRun=true"
80+
DRY_RUN_OPTS=""
81+
if [[ "${{ inputs.dry-run }}" != "true" ]]; then
82+
DRY_RUN_OPTS="-Drelease.autopublish=true"
8283
fi
8384
if [[ "${{ inputs.skip-tests }}" == "true" ]]; then
8485
MAVEN_OPTS="${MAVEN_OPTS} -DskipTests=true -DskipITs=true"
8586
fi
8687
export MAVEN_OPTS
87-
$MVNCMD release:perform -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} > >(tee /tmp/logs-stdout.log) 2> >(tee /tmp/logs-stderr.log)
88+
echo MAVEN_OPTS=$MAVEN_OPTS $MVNCMD release:perform $DRY_RUN_OPTS
89+
$MVNCMD release:perform $DRY_RUN_OPTS -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} > >(tee /tmp/logs-stdout.log) 2> >(tee /tmp/logs-stderr.log)
8890
8991
- name: Upload stdout.log
9092
if: failure()
@@ -101,7 +103,7 @@ jobs:
101103
path: /tmp/logs-stderr.log
102104

103105
- name: Push changes to SCM
104-
if: ${{ inputs.dryrun == 'false' && inputs.target-tag == 'master' }}
106+
if: ${{ inputs.dry-run == 'false' && inputs.target-tag == 'master' }}
105107
run: |
106108
git status && git log -3
107109
git push origin --follow-tags -v

pom.xml

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
<modules>
1313
<module>scylla-cdc-base</module>
1414
<module>scylla-cdc-lib</module>
15-
<!--
16-
Find a way to disable more than one plugin via central-publishing-maven-plugin configuration.
17-
1815
<module>scylla-cdc-replicator</module>
1916
<module>scylla-cdc-printer</module>
20-
-->
2117
<module>scylla-cdc-driver3</module>
2218
</modules>
2319

@@ -27,6 +23,7 @@
2723
<maven.compiler.target>11</maven.compiler.target>
2824
<flogger.version>0.8</flogger.version>
2925
<gpg.passphrase/>
26+
<release.autopublish>false</release.autopublish>
3027
</properties>
3128

3229
<dependencyManagement>
@@ -86,12 +83,11 @@
8683
<configuration>
8784
<tagNameFormat>scylla-cdc-@{project.version}</tagNameFormat>
8885
<autoVersionSubmodules>true</autoVersionSubmodules>
89-
<!-- useReleaseProfile>false</useReleaseProfile>
9086
<releaseProfiles>release</releaseProfiles>
91-
<goals>deploy</goals-->
87+
<useReleaseProfile>false</useReleaseProfile>
9288
<localCheckout>true</localCheckout>
9389
<pushChanges>false</pushChanges>
94-
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
90+
<arguments>-Dgpg.passphrase=${gpg.passphrase} -Drelease.autopublish=${release.autopublish}</arguments>
9591
</configuration>
9692
<dependencies>
9793
<dependency>
@@ -104,19 +100,6 @@
104100
</plugins>
105101
</pluginManagement>
106102
<plugins>
107-
<plugin>
108-
<groupId>org.sonatype.central</groupId>
109-
<artifactId>central-publishing-maven-plugin</artifactId>
110-
<version>0.7.0</version>
111-
<extensions>true</extensions>
112-
<configuration>
113-
<publishingServerId>central</publishingServerId>
114-
<autoPublish>true</autoPublish>
115-
<skipPublishing>false</skipPublishing>
116-
<waitForPublishCompletion>true</waitForPublishCompletion>
117-
<waitUntil>validated</waitUntil>
118-
</configuration>
119-
</plugin>
120103
<plugin>
121104
<groupId>org.apache.maven.plugins</groupId>
122105
<artifactId>maven-surefire-plugin</artifactId>
@@ -142,6 +125,18 @@
142125
<artifactId>maven-release-plugin</artifactId>
143126
<version>3.1.1</version>
144127
</plugin>
128+
<plugin>
129+
<groupId>org.sonatype.central</groupId>
130+
<artifactId>central-publishing-maven-plugin</artifactId>
131+
<version>0.8.0</version>
132+
<extensions>true</extensions>
133+
<configuration>
134+
<publishingServerId>central</publishingServerId>
135+
<excludeArtifacts>scylla-cdc-printer,scylla-cdc-replicator</excludeArtifacts>
136+
<autoPublish>${release.autopublish}</autoPublish>
137+
<waitUntil>validated</waitUntil>
138+
</configuration>
139+
</plugin>
145140
</plugins>
146141
</build>
147142

@@ -163,7 +158,7 @@
163158
<plugin>
164159
<groupId>org.apache.maven.plugins</groupId>
165160
<artifactId>maven-gpg-plugin</artifactId>
166-
<version>3.2.4</version>
161+
<version>3.2.7</version>
167162
<executions>
168163
<execution>
169164
<id>sign-artifacts</id>
@@ -193,8 +188,6 @@
193188
</execution>
194189
</executions>
195190
</plugin>
196-
<!--
197-
TODO: re-enable when there are javadocs.
198191
<plugin>
199192
<artifactId>maven-javadoc-plugin</artifactId>
200193
<executions>
@@ -206,11 +199,9 @@
206199
</execution>
207200
</executions>
208201
</plugin>
209-
-->
210202
<plugin>
211203
<groupId>org.apache.maven.plugins</groupId>
212204
<artifactId>maven-gpg-plugin</artifactId>
213-
<version>3.2.4</version>
214205
<executions>
215206
<execution>
216207
<id>sign-artifacts</id>

0 commit comments

Comments
 (0)