Skip to content

Notify DingTalk when hvigor-plugin is published to npm - #36

Merged
Fiona2016 merged 1 commit into
mainfrom
ci/hvigor-plugin-publish-notify
Aug 28, 2026
Merged

Notify DingTalk when hvigor-plugin is published to npm#36
Fiona2016 merged 1 commit into
mainfrom
ci/hvigor-plugin-publish-notify

Conversation

@Fiona2016

Copy link
Copy Markdown
Collaborator

0.1.2, 0.1.3 and 0.1.4 all reached npm without any notification: publish-hvigor-plugin.yml has never had one. The DingTalk steps only ever existed in publish-ohpm.yml, which is a separate workflow for the OHPM SDK packages and triggers on a different tag.

A build-time plugin ships less often than the SDK, which is precisely why a silent release goes unnoticed.

What this adds

notify-success and notify-failure, mirroring the jobs in publish-ohpm.yml:

  • Both DingTalk groups on success, the primary group on failure
  • ignoreError: "true", so a broken webhook cannot mark a release that already reached npm as failed
  • The version comes from the tag, which is exact — the publish job already fails unless the tag matches hvigor-plugin/package.json
  • No environment: Production on these jobs: the DingTalk secrets are repository-level, and only the publish job needs the environment gate

Where it has to live

A tag-triggered run uses the workflow file at the tagged commit, and release tags point at commits on main — so this has to be on main to take effect for the next release. The workflow_dispatch path runs from publish, which will pick it up the next time main is merged there during a release.

The npm publish workflow had no notification of any kind, so 0.1.2, 0.1.3 and
0.1.4 all reached npm silently — the DingTalk steps only ever existed in the OHPM
SDK release. A build-time plugin ships less often than the SDK, which is exactly
why nobody notices a release without being told.

Mirrors the notification jobs in publish-ohpm.yml, including ignoreError so a
broken webhook cannot mark a release that already reached npm as failed. On a tag
the reported version is exact: the publish job already fails unless the tag
matches hvigor-plugin/package.json.

The DingTalk secrets are repository-level, so these jobs do not need the
Production environment the publish job runs in.
@Fiona2016
Fiona2016 merged commit 2e03f25 into main Aug 28, 2026
6 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.

1 participant