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: add GitHub Actions workflow for automated release pull requests #115

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

k-nkmr
Copy link
Contributor

@k-nkmr k-nkmr commented Jan 31, 2025

πŸ”— Issue Link

related: #78

πŸ™Œ What I did

  • Add a workflow that automatically generates a pull request

✍️ What I didn't do

  • Add a workflow that automatically publish to pub.dev

βœ… Verification

  • Android
  • iOS
  • macOS
  • Web

Screenshots

Additional Information

First, I created a workflow that automatically generates a pull request using the Melos version.
Separately, I will create another workflow to automatically publish to pub.dev.

@k-nkmr k-nkmr marked this pull request as ready for review January 31, 2025 07:47
@k-nkmr k-nkmr requested a review from a team as a code owner January 31, 2025 07:47
@k-nkmr k-nkmr requested review from naipaka and removed request for a team January 31, 2025 07:47
Copy link
Contributor

@naipaka naipaka left a comment

Choose a reason for hiding this comment

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

Thank you for creating this! I’ve left a few comments! πŸš€

Comment on lines +4 to +8
workflow_dispatch:
inputs:
scope:
description: "Package name to release (e.g., altfire_authenticator)"
required: true
Copy link
Contributor

@naipaka naipaka Jan 31, 2025

Choose a reason for hiding this comment

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

badge
I think this should be a selection rather than free input!
It looks like type: choice could be useful here ✍️

GitHub Docs: Workflow syntax for GitHub Actions

Copy link
Contributor

Choose a reason for hiding this comment

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

There are cases where multiple packages are updated simultaneously like this, so making it optional might be a good idea πŸ’­

#98

env:
MELOS_ALLOW_DIRTY: "true"
run: |
melos version --patch --no-private --yes --scope="${{ github.event.inputs.scope }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

badge badge
I was thinking it might be better not to make the patch version change fixed. What do you think?
It might be better to remove --patch and let it be determined automatically!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since melos version can determine the version increment automatically, specifying --patch is unnecessary.
I’ll remove it.πŸ™πŸ»

id: set-output
run: |
BRANCH_NAME="release/${{ github.event.inputs.scope }}-${{ env.version }}"
echo "branch=$BRANCH_NAME" >> "$GITHUB_ENV"
Copy link
Contributor

Choose a reason for hiding this comment

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

badge
My understanding is that GITHUB_ENV is meant to be used across different steps within the same job, so it seems unnecessary here!

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