Skip to content

Conversation

okineadev
Copy link
Contributor

It is better to build dist and format files only before release in order not to spam with commits and unnecessary changes

I also added automatic generation of release notes with changelogen, when the Release Workflow starts it will automatically write the release notes, commit all the changes, run them and create a new release with a new version according to the changes made thanks to Conventional Commits

@xhyrom
Copy link
Collaborator

xhyrom commented Feb 5, 2025

By building dist only before release, it's not possible to use commit hash to pin the setup-bun version. Did you consider that?

@okineadev
Copy link
Contributor Author

By building dist only before release, it's not possible to use commit hash to pin the setup-bun version. Did you consider that?

How so?

changelogen makes the commit chore: release 1.2.3, this is the commit that can be attached

@okineadev
Copy link
Contributor Author

By building dist only before release, it's not possible to use commit hash to pin the setup-bun version. Did you consider that?

It will be possible to attach only the release version and not the version of any commit

@okineadev
Copy link
Contributor Author

I very much doubt that there are people who attach the hash of a particular commit and not the commit of the new version

But if necessary, I can undo this change

@okineadev
Copy link
Contributor Author

@xhyrom So should I make dist generated after each commit?

@xhyrom
Copy link
Collaborator

xhyrom commented Feb 5, 2025

I very much doubt that there are people who attach the hash of a particular commit and not the commit of the new version

They exist; in fact, even github recommends it - https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#:~:text=Pin%20actions%20to%20a%20full%20length%20commit%20SHA

@xhyrom So should I make dist generated after each commit?

That's already done by autofix.ci

@okineadev
Copy link
Contributor Author

They exist; in fact, even github recommends it - docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#:~:text=Pin actions to a full length commit SHA

I know, but I'm talking about completely different

That's already done by autofix.ci

I will then rewrite it so that it commits on behalf of the bot, and I will remove the formatting and build step from the release workflow

@xhyrom
Copy link
Collaborator

xhyrom commented Feb 5, 2025

They exist; in fact, even github recommends it - docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#:~:text=Pin actions to a full length commit SHA

I know, but I'm talking about completely different

Can you tell me what are you talking about? I thought we had discussion about using commit sha as action version.

@okineadev
Copy link
Contributor Author

They exist; in fact, even github recommends it - docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#:~:text=Pin actions to a full length commit SHA

I know, but I'm talking about completely different

Can you tell me what are you talking about? I thought we had discussion about using commit sha as action version.

I and everyone else pin the hash of the commit to GitHub Actions (or rather Renovate does this)

For example some-cool/action@67rf323rn79an67r208703 # 1.2.3

As you can see, the comment on the right shows the version of action that is used here, and therefore the hash of the commit, this is the commit on which the release was created

If I need to attach to some other commit, I will change its hash

But I have not yet seen such cases where it is necessary to attach to a specific commit other than the release commit

@okineadev
Copy link
Contributor Author

@xhyrom I already updated the autofix.ci workflow and now it will commit on behalf of the bot

@xhyrom
Copy link
Collaborator

xhyrom commented Jul 8, 2025

Can you resolve conflicts?
@okineadev

@okineadev
Copy link
Contributor Author

Can you resolve conflicts?
@okineadev

Yep but later

@okineadev
Copy link
Contributor Author

Can you resolve conflicts? @okineadev

Done!

@xhyrom
Copy link
Collaborator

xhyrom commented Jul 9, 2025

Can you resolve conflicts? @okineadev

Done!

One more time please 😅

@okineadev
Copy link
Contributor Author

Can you resolve conflicts? @okineadev

Done!

One more time please 😅

Im done

@okineadev okineadev requested a review from xhyrom July 9, 2025 13:34
Copy link
Collaborator

@xhyrom xhyrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should ensure code is formatted on every commit —not just before releases. Relying on formatting and building only at release time leads to inconsistencies and breaks the ability to use any commit hash as a action version.

I think there's currently no better way than using autofix.

@xhyrom xhyrom changed the title feat(ci): automatically generate release notes and build dist only on release ci: automatically generate release notes and build dist only on release Jul 9, 2025
@okineadev
Copy link
Contributor Author

We should ensure code is formatted on every commit —not just before releases. Relying on formatting and building only at release time leads to inconsistencies and breaks the ability to use any commit hash as a action version.

I think there's currently no better way than using autofix.

I know solution but wait please

@okineadev
Copy link
Contributor Author

We should ensure code is formatted on every commit —not just before releases. Relying on formatting and building only at release time leads to inconsistencies and breaks the ability to use any commit hash as a action version.

I think there's currently no better way than using autofix.

In order to ensure that the code is formatted at each stage, we can lint each commit

For example, someone created a PR, and on some commit the author did not format the code - CI will lint it and report an error

But then you have to manually fix the formatting errors

If necessary, we can do this with autofix.ci

I'll do it now.

@okineadev okineadev requested a review from xhyrom July 9, 2025 15:47
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.

3 participants