-
Notifications
You must be signed in to change notification settings - Fork 3
ci: Add job to deploy to pub.dev #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
📝 WalkthroughWalkthroughThis pull request introduces a new GitHub Actions workflow file named Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant Pw as Publish Workflow
participant DS as Dart Setup
Dev->>GH: Push tag (e.g., v1.2.3)
GH->>Pw: Trigger publish job based on tag pattern
Pw->>DS: Invoke dart-lang/setup-dart publish workflow
DS-->>Pw: Return publishing result
Pw-->>GH: Complete publish job
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/publish.yaml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/publish.yaml
6-6: character '' is invalid for branch and tag names. only special characters [, ?, +, *, , ! can be escaped with . see man git-check-ref-format for more details. note that regular expression is unavailable. note: filter pattern syntax is explained at https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
(glob)
6-6: character '' is invalid for branch and tag names. only special characters [, ?, +, *, , ! can be escaped with . see man git-check-ref-format for more details. note that regular expression is unavailable. note: filter pattern syntax is explained at https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
(glob)
🔇 Additional comments (2)
.github/workflows/publish.yaml (2)
1-2: Workflow Name is ClearThe workflow name "Publish CLI Tools" clearly reflects its purpose and adds clarity to the CI configuration.
8-13: Job Configuration is CorrectThe job "publish" is properly configured by setting the required
id-token: writepermission and correctly referencing the reusable workflow fromdart-lang/setup-dart. This aligns with the Dart documentation for automated publishing.
4118081 to
ea31c42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
PUBLISH.md (2)
11-11: Minor Language Correction: Possessive Form
Consider changing “GitHubs interface” to “GitHub's interface” to properly indicate possession.🧰 Tools
🪛 LanguageTool
[uncategorized] ~11-~11: You might be missing the article “the” here.
Context: ...erred way to create a new tag is to use GitHubs interface to create a new release. The...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
13-13: Punctuation Enhancement for Clarity
Adding a comma after “Instead” (i.e., “Instead, theCHANGELOG.mdis our source of truth on pub.dev.”) would improve readability.🧰 Tools
🪛 LanguageTool
[uncategorized] ~13-~13: A comma may be missing after the conjunctive/linking adverb ‘Instead’.
Context: ...hub release do not need to be modified. Instead theCHANGELOG.mdis our source of tru...(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
PUBLISH.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
PUBLISH.md
[uncategorized] ~11-~11: You might be missing the article “the” here.
Context: ...erred way to create a new tag is to use GitHubs interface to create a new release. The...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~13-~13: A comma may be missing after the conjunctive/linking adverb ‘Instead’.
Context: ...hub release do not need to be modified. Instead the CHANGELOG.md is our source of tru...
(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
🔇 Additional comments (1)
PUBLISH.md (1)
1-9: Clear and Informative Documentation Structure
The guidelines are well outlined and provide clear instructions on how to publish the package. The explanations on tag formats and usage of semantic versioning are concise and align with the automated publishing process outlined by Dart.
christerswahn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great automation! 🚀
Enable CI job for deploying to pub.dev when a release tag is created.
The tag needs to start with
vfollowed by a semver number and then optionally followed by any character. For example,v1.2.3orv1.2.3-pre.1Follows the guide here: https://dart.dev/tools/pub/automated-publishing#configuring-automated-publishing-from-github-actions-on-pub-dev
Note on regex
Seems like Github uses the glob pattern but treats some characters different (*, **, +, ?, ! ) meaning that
.does not need to be escaped but will be treated as a single dot.Tested patterns listed above in a different repo:
Source:
Summary by CodeRabbit
Summary by CodeRabbit
PUBLISH.mdfile with guidelines for publishing CLI tools, including versioning and tagging instructions.