Skip to content

Commit db5e281

Browse files
Fix release notes to conditionally mention Maven Central based on deployment
Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
1 parent 5d294e2 commit db5e281

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

.github/workflows/manual-release.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,36 @@ jobs:
189189
run: |
190190
TAG_NAME="${{ steps.validate_version.outputs.tag_name }}"
191191
VERSION="${{ steps.validate_version.outputs.version }}"
192+
SKIP_MAVEN="${{ github.event.inputs.skip_maven_central }}"
192193
193-
# Create release notes
194-
cat > /tmp/release-notes.md << 'EOF'
195-
## Release ${{ steps.validate_version.outputs.version }}
194+
# Create release notes with conditional Maven Central section
195+
cat > /tmp/release-notes.md << EOF
196+
## Release ${VERSION}
196197
197198
This release was created via the manual release workflow.
199+
EOF
200+
201+
# Add Maven Central section only if deployment was not skipped
202+
if [ "$SKIP_MAVEN" != "true" ]; then
203+
cat >> /tmp/release-notes.md << EOF
198204
199205
### Maven Central
200206
Artifacts are available on Maven Central:
201-
- [xapi-model](https://central.sonatype.com/artifact/dev.learning.xapi/xapi-model/${{ steps.validate_version.outputs.version }})
202-
- [xapi-client](https://central.sonatype.com/artifact/dev.learning.xapi/xapi-client/${{ steps.validate_version.outputs.version }})
203-
- [xapi-model-spring-boot-starter](https://central.sonatype.com/artifact/dev.learning.xapi/xapi-model-spring-boot-starter/${{ steps.validate_version.outputs.version }})
207+
- [xapi-model](https://central.sonatype.com/artifact/dev.learning.xapi/xapi-model/${VERSION})
208+
- [xapi-client](https://central.sonatype.com/artifact/dev.learning.xapi/xapi-client/${VERSION})
209+
- [xapi-model-spring-boot-starter](https://central.sonatype.com/artifact/dev.learning.xapi/xapi-model-spring-boot-starter/${VERSION})
210+
211+
Note: It may take up to 2 hours for artifacts to sync to Maven Central.
212+
EOF
213+
else
214+
cat >> /tmp/release-notes.md << EOF
215+
216+
### Note
217+
This is a dry-run release. Artifacts were NOT deployed to Maven Central.
218+
EOF
219+
fi
220+
221+
cat >> /tmp/release-notes.md << EOF
204222
205223
### Changes
206224
See commit history for details.

0 commit comments

Comments
 (0)