Skip to content
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

Ci/update publish workflow #1878

Merged
merged 5 commits into from
May 19, 2024
Merged

Ci/update publish workflow #1878

merged 5 commits into from
May 19, 2024

Conversation

EchoEllet
Copy link
Collaborator

@EchoEllet EchoEllet commented May 19, 2024

Description

Since we split some of the code into different packages instead of one package, we had to update the way we publish the packages and automate it when possible, previously we had a different version for both flutter_quill and flutter_quill_extensions, while this approach gives us more flexibility, it's not clear which version of flutter_quill_extensions is compatible with a specific version of flutter_quill so we need a table for the compatible versions in the README.md or somewhere else, using a different version for each package will also require a different Github repository for each package to automate the publishing with Github releases, the solution we use instead is to have one universal version and CHANGELOG.md for all the packages which make things easier but require a little bit more setup from the maintainers side, before this PR, we have to update the version in the version.dart file, run a script which will update all the version and CHANGELOG (will use the root CHANGELOG.md file for all the packages) for all the packages we have, while there are other solutions and CLI tools but it require the maintainers and contributors to install them using dart pub command globally, so we had to do it in more quick and manual way, this PR make things a little bit easier:

  • The script that is used to update the version no longer needs version.dart, it will require the version in the argument and it's no longer needed to run the script by the maintainers and commit the changes and push them before releasing a new version, the publish.yml workflow will automate that process by running the script and pass the version from the version that is used in GitHub releases (from the tag name and not the release name), so the script is only needed from the GitHub publish.yml workflow
  • At the moment, the script or the CI will not automate the process of generating the CHANGELOG.md changes (it's possible but that would require all the developers who send PRs to use a descriptive title for the PR since it will be used for the CHANGELOG files or we could get it from the Release notes from GitHub), we still have to do it manually but only for the CHANGELOG.md at the root folder, the script that is used in the CI will also copy the contents of the CHANGELOG.md file and overwrite them into the sub-packages (flutter_quill_extensions, flutter_quill_test), we might update in the future
  • Currently the branch name master is hardcoded which will not allow publishing pre/dev releases when working on dev or develop or other branches as it will cause failure or simply publish the commits (the changes made by the script) to the master branch

Thanks to yves-chevallier as his comment helped me fix the CI failure by the step Commit the changes of the updated version & CHANGELOG for all the packages

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • I have run the commands in ./scripts/before_push.sh and it all passed successfully

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

Ellet added 4 commits May 19, 2024 17:48
…script now require the version as a argument which will be used by Github publich.yml workflow and pass it instead
…rsions to require the new version as argument instead of using it from version.dart
…version and commit it, then push the changes to Github repository
@EchoEllet EchoEllet marked this pull request as ready for review May 19, 2024 15:19
@EchoEllet EchoEllet merged commit 80a9953 into master May 19, 2024
2 checks passed
@EchoEllet EchoEllet deleted the ci/update-publish-workflow branch June 13, 2024 10:34
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.

None yet

1 participant