rejuvenate / lovelace-horizon-card

Sun Card successor: Visualize the position of the Sun over the horizon.
MIT License
476 stars 35 forks source link

Fix release pipeline #159

Open scinos opened 2 weeks ago

scinos commented 2 weeks ago

Comes from the discussion in #157. I open this issue to centralize the discussion

Issue

Looks like the build pipeline has been broken, since #88 was merged. When a PR is merged to main, the check Build & Release fails.

How the pipeline works

The release happens in two separate actions, in the same workflow:

Issues with current pipeline.

  1. If the label norelease (which is the default) is used, then the second action will fail because there is no release to attach the file to. Note that this is only cosmetic. Failing to attach the file to the release only causes a ❌ in the UI, nothing bad actually happens.
  2. This only creates GitHub releases, it doesn't create NPM releases. This is mostly harmless because main consumers of this card will install it using HACS, not form NPM. But there are use cases where a NPM release is desired (for example, if a card extends this one, or users are composing their HomeAssitant frontend manually without HACS).
  3. Similar to 2, the release pipeline doesn't increase the version in package.json nor maintains a CHANGELOG.md in the repo. Again, not a hard requirement, just a nice to have.

Potential solutions

Problem 1

For Problem 1, there are no way to skip a workflow step based on the output of another step (afaik). We could do it using separate workflows though:

Problem 2

Solutions for Problem 2 and Problem 3 are more complex. In my opinion, the perfect process will:

Solving Problem 2 and 3 requires more investigations.

scinos commented 2 weeks ago

I'll prepare a fix for the Problem 1 with the solution proposed above, then we can discuss about Problem 2.