Skip to content

build: adopt stream-sdk release workflow and Central packaging - #4

Merged
haofeng0705 merged 2 commits into
DingTalk-Real-AI:mainfrom
typefield:stream-sdk-release-workflow
Sep 21, 2026
Merged

haofeng0705 merged 2 commits into
DingTalk-Real-AI:mainfrom
typefield:stream-sdk-release-workflow

Conversation

@typefield

Copy link
Copy Markdown
Contributor

Summary

Adopts the official open-dingtalk/dingtalk-stream-sdk-java release workflow and Central packaging:

  • Add Central-required POM metadata (<licenses>, <scm>, <developers>).
  • Add release profile with central-publishing-maven-plugin (0.9.0), maven-gpg-plugin (3.2.4), maven-source-plugin (3.3.1), and maven-javadoc-plugin (3.6.3).
  • Add settings.xml mapping ${env.MAVEN_USERNAME} and ${env.MAVEN_PASSWORD} to the sonatype server.
  • Add LICENSE (MIT).
  • Add .github/workflows/release.yml for building, GPG signing, and publishing to Central Portal.

Test plan

  • Verified mvn clean compile passes under Java 8.
  • Verified release profile plugin configuration matches open-dingtalk/dingtalk-stream-sdk-java.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@haofeng0705 haofeng0705 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

发布工作流整体结构正确,但发布命令未激活 release profile:

  • pom.xml 中 central-publishing-maven-plugin、maven-gpg-plugin、source/javadoc 插件都放在 <profile><id>release</id></profile> 里,且未设置 <activeByDefault>true</activeByDefault> 或属性触发。
  • .github/workflows/release.yml 的 Deploy to Sonatype Central 步骤执行的是 mvn deploy --settings settings.xml -DskipTests,没有 -P release,因此不会执行 GPG 签名、source/javadoc 打包,Central Portal 会拒绝发布。

请修改:在发布路径(release 事件)的 deploy 命令中加入 -P release,例如:

mvn -P release clean deploy --settings settings.xml -DskipTests

build 步骤的 mvn clean install 可保持原样用于验证,但部署步骤必须带 -P release。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@typefield

Copy link
Copy Markdown
Contributor Author

已更新:

  • 在 .github/workflows/release.yml 的 Deploy to Sonatype Central 步骤中增加 -P release 参数(mvn -P release clean deploy --settings settings.xml -DskipTests),确保 Central 发布时激活 release profile 并执行 GPG 签名与 source/javadoc 打包。
  • 新提交为 7edc5ef03c45b4a69a01bef6dc38b37ba2f7e47c,CI 全部测试(Java 8/11/17)均已 pass。

@haofeng0705 haofeng0705 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复查通过:deploy 步骤已改为 mvn -P release clean deploy --settings settings.xml -DskipTests,release profile 将在发布时执行 GPG 签名与 source/javadoc 打包;Java 8/11/17 CI 全绿,可合入。

@haofeng0705
haofeng0705 merged commit 39ed124 into DingTalk-Real-AI:main Sep 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants