backstage / mkdocs-techdocs-core

The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions
Apache License 2.0
83 stars 61 forks source link

Added discord notification for new release to PyPi #106

Closed awanlin closed 10 months ago

awanlin commented 1 year ago

This adds a notification to Discord when a new release is published to PyPi

One of the maintainers will need to add the DISCORD_RELEASE_WEBHOOK secret as part of this getting merged in.

iamEAP commented 1 year ago

I'll leave it to @agentbellnorm to do the honors.

One thought that pops in my head: I have a vague memory that the publish pipeline runs on every merge to main, and it kind of implicitly depends on a publish action quietly failing when the version number isn't incremented in the PR. And maybe this could cause the publish announcement to be sent multiple times for a given version?

I may be misremembering.

Rugvip commented 1 year ago

I've added DISCORD_RELEASE_WEBHOOK, but +1 to Eric's concern

agentbellnorm commented 1 year ago

I'm not super familiar with gh-actions, but maybe it's possible to make the workflow

After reading a bit I'd try to break the publishing + notification out into their own job and setting allow-failure: true on that job. wdyt @awanlin ?

awanlin commented 1 year ago

OK, thanks for reviewing and the feedback. I made some assumptions based on the way the on.push.paths was setup. I thought this workflow would only run when those files changed (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-paths).

I'll take a look at what @agentbellnorm has suggested and if that doesn't get me anywhere I can do what I did with the Demo site and check to see if the commit has changes to the setup.py file.

github-actions[bot] commented 10 months ago

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!