Skip to content

ci: Implementing Automated Version Release and Publish to PlatformIO #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

mohammedelgammal
Copy link
Contributor

docs: Assuring conventional commits

  • This PR changed: [prlint.yml]: Validates every PR against Conventional Commits to guarantee a healthy release and publish. [release.yml]: Automates releasing a new version including all the necessary steps using semantic-release action. Must pass prlint and tests CIs. [publish.yml]: Automates publishing the new released version to PlatformIO registry and update versions in library.json and library.properties files. Depends on [release.yml]. [CONTRIBUTING.md]: Added note for new contributors about conventional commit message.

resolves issue #5

docs: Assuring conventional commits

- This PR changed:
[prlint.yml]: Validates every PR against Conventional Commits to guarantee a healthy release and publish.
[release.yml]: Automates releasing a new version including all the necessary steps using semantic-release action.  Must pass prlint and tests CIs.
[publish.yml]: Automates publishing the new released version to PlatformIO registry and update versions in library.json and library.properties files.  Depends on [release.yml].
[CONTRIBUTING.md]: Added note for new contributors about conventional commit message.

resolves issue AlexandreHiroyuki#5
@AlexandreHiroyuki AlexandreHiroyuki added the ci Continuous Integration label Jan 28, 2025

Choose a reason for hiding this comment

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

How can you guarantee the library version update script to run before publishing it to PlatformIO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To guarantee a library version update before publishing:
1- The [Publish to PlatformIO] only triggers when there is a new release on GitHub so the tag is guaranteed to be different.
2- Even in case there is a new release tag is out it double checks if [$LATEST_TAG] is different from the current library versions [$LIB_V] and [$PROPS_V] before update and publishing (updated in latest commit: exits with error if there are no changes or any of files manipulations fails)

@AlexandreHiroyuki
Copy link
Owner

Again, thank you for dedicating your time to solving a CI issue. I never thought someone would pay attention to a matter that's not the core code.

Copy link
Owner

@AlexandreHiroyuki AlexandreHiroyuki left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexandreHiroyuki AlexandreHiroyuki merged commit 3b5b048 into AlexandreHiroyuki:main Jan 29, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants