browser-extension-template icon indicating copy to clipboard operation
browser-extension-template copied to clipboard

Is it possible to have the release workflow appear as a deployment?

Open fregante opened this issue 4 years ago • 6 comments

Sometimes deployments fail and nobody notices. There are 2 ways to make them more visible:

  • use GitHub deployments, somehow, they appear in their own section on GitHub
  • include a badge somewhere in the readme

fregante avatar Apr 07 '21 00:04 fregante

Screen Shot 1

It's possible and it looks great! https://docs.github.com/en/rest/reference/repos#create-a-deployment-status

But this might require a bit of code. I'm considering writing an action

fregante avatar Apr 19 '21 09:04 fregante

https://github.com/fregante/compact-github-deployment-action

fregante avatar Apr 19 '21 18:04 fregante

The link above is no longer working. As it is already used on the master branch in github actions workflow, the workflow is now broken.

gbdlin avatar May 10 '21 16:05 gbdlin

Ah sorry about that. It seemed to work after I made it private, but it guess it stopped. The action wasn’t working as well as intended and I had to rewrite it, but it’s still not done.

Could you send a PR to revert my last commit? I don’t have access to a computer right now

fregante avatar May 10 '21 17:05 fregante

Undone in 9b1f180

fregante avatar May 11 '21 12:05 fregante

It looks like GitHub added native support for this via jobs.*.environment property. See:

  • https://github.com/refined-github/github-url-detection/deployments/activity_log?environment=github-pages
  • https://github.com/refined-github/github-url-detection/blob/b93c1f18d7307f72943a95094f4c12127f3ca8c3/.github/workflows/demo.yml#L33-L35

That key likely creates a deployment and keeps track of it as part of the job’s lifecycle.

fregante avatar Jul 28 '22 07:07 fregante

Sweet, it works!

  • https://github.com/hankxdev/one-click-extensions-manager/deployments
  • https://github.com/hankxdev/one-click-extensions-manager/pull/98
Screenshot 5

fregante avatar Mar 02 '23 12:03 fregante