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

[RND-649] Add lerna version update process into GitHub Action #320

Merged
merged 15 commits into from
Nov 14, 2023

Conversation

andonyns
Copy link
Contributor

Use lerna update process to apply changes into packages and commit changes into code.

Description

  • Delegate the version changes calculation to Lerna (without creating a commit).
  • Use new action to commit changes as a verified use
  • Avoid multiple version updates from PRs
  • Update node typing, versions and documentation where needed

To see the changes in place, see https://github.com/andonyns/Meadowlark
Main branch has write protection so all changes are done via PR.
See andonyns#18 as a demo of a PR ready to be merged and tag has not been created

@andonyns andonyns requested a review from a team as a code owner November 14, 2023 18:42
"npmClient": "npm",
"useWorkspaces": true,
"command": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could potentially allow users to create tags with lerna from branches, but this is currently possible from git tags also

@@ -3,12 +3,7 @@
"packages": [
"packages/*"
],
"version": "v0.3.0-pre-35",
"version": "0.4.0-pre.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This update had to be done manually for the first version, this will be done automatically in future changes

- name: Get changes
id: changes
run: |
suggested=v$(cat lerna.json | jq -r .version)
Copy link
Contributor Author

@andonyns andonyns Nov 14, 2023

Choose a reason for hiding this comment

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

To check whether or not we need to add a new commit for the new version, we compare the value in lerna.json against the latest tag available, if it's different, we assume that a change has already be done as part of this PR.

warning this means that manually updating the lerna.json version (not recommended) will cause the update not to run

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -12,6 +12,10 @@ on:
- ".github/**"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@stephenfuqua stephenfuqua merged commit b936443 into main Nov 14, 2023
15 checks passed
@stephenfuqua stephenfuqua deleted the RND-649 branch November 14, 2023 23:11
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.

2 participants