AnthonMS / my-cards

Bundle of my custom Lovelace cards for Home Assistant. Includes: my-slider, my-slider-v2, my-button
Other
104 stars 27 forks source link

Refactor project structure by using Github's Actions, Issue Templates, and versioning #31

Closed DenyThis closed 2 years ago

DenyThis commented 2 years ago

Hi Anthon!

I hope you're doing well! I took a minute to reorganize your project a bit by using the power of Github a bit more. You can do cool things like versioning by creating releases accompanied by tags. I've also added Issue templates just in case you're interested in getting feedback from your users directly in Github. Lastly, I reorganized the documentation a bit more so that it can be easier to maintain in the future. Let me know what you think!

Thanks, Deny

DenyThis commented 2 years ago

Also, in the topic of Github Actions, now you have 3 scripts:

AnthonMS commented 2 years ago

Hello Deny,

This looks like a sure quality of life update for all the users and myself, so I can have more control of the releases. Instead of it just relying on commits.

So thank you immensely for your contribution. I'm always happy to see when people take an interest, even if it's mostly for their own benefit when the original maintainer is too lazy to set these things up themselves.

I have never used GitHub actions, but I use the equivalent in bit bucket daily and I'm assuming there's not much difference.

Is there anything particular that I need to be aware of, when I merge this?

I will take a closer look on the computer, when I have time one of the days. But on the phone it looks like you have deleted a lot of the issue templates? Or is it because I'm seeing it wrong on the phone?

I'm looking forward to merging this, so hopefully I can squeeze it in when working tomorrow.

Thanks a bunch, Anthon

DenyThis commented 2 years ago

Hey Anthon! It's great that you like it!!

As for the commits - tl;dr they're essentially a no-op, I added them via Github's website, didn't love them, and removed them once again. All in favor of my previously committed ones with cool icons 🙂

Long version - I was playing around with GitHub autogenerated ones (even tho I had ones in hand from another project), so I ended up going for the ones I had. I used GitHub's own delete function to get rid of them, that's why I ended up with a bunch of commits (one per file, so kinda annoying). Hopefully they add a functionality to bulk-remove files from GitHub's website in the future! Now that I think about it, I should've just rolled back that commit! 😅

Also, yeah, I believe GitHub and Bitbucket are pretty similar in regard to actions/scripts. Of course, feel free to give me a shout if you need help understanding how the flow, well, flows!

Thanks! Deny

AnthonMS commented 2 years ago

Hello @DenyThis, I have merged the PR. Again thank you for contributing your time and work!

Do you have a couple quick comments to make my life easier, so I don't have to go down the rabbit hole of figuring out how the releases work.

When you mention I have to use the "vX.Y.Z" format. Do you mean in a commit message? Can I trigger the npm build github action and make a new release directly from a commit message or do I need to go to the github releases page and manually create release?

The Bug and Feature request templates looks good and sure to make my life a little easier when bug reports are issued.

I have also just been notified that an action failed. Is this something you know anything about? image

I have tried researching it a bit, and I can't seem to figure out why it says the project structure isn't valid. It look an awful lot like a lot of other cards. But maybe they aren't using the validation.

I can see the dist dir is gone. I hope this won't affect any users.

DenyThis commented 2 years ago

Hi Anthon! My apologies on the late response, but I noticed you were able to make a release! Pretty straightforward, right?

As for the HACS Validation job - it always does that when there's no "release" (i.e. the first time you run the new setup). Give it another go now that the release has deployed all the necessary compiled .js files for HACS, and it should move past this. I'm expecting it to pass now that you have most of the things that it requires to pass (i.e. Github Issues enabled, Github topics/tags, etc.). Of course, let me know if it doesn't work and I'll give you a hand!

As for the dist dir - it shouldn't affect users, as now it's just pulling it from the release built files instead of from the project itself. Worst case scenario we can put these back for backwards compatibility with any non-standard setups.

AnthonMS commented 2 years ago

No problem at all about the late reply. I do not see the option of manually triggering the workflows for build, validate and release. How do I trigger these?

DenyThis commented 2 years ago

Go to the action that failed and it should be in the top right corner of the screen (the "re-run jobs" dropdown):

image