-
Notifications
You must be signed in to change notification settings - Fork 117
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
chore: upgrade release workflow #3524
Conversation
📝 WalkthroughWalkthroughThe changes update two GitHub Actions workflows. In the release publishing workflow, the changelog verification job has been removed, and version handling has been revised by replacing the major version variable with a generic version variable. The GitHub release action has been updated, and a new job for publishing TypeScript has been added. Separately, the TypeScript publishing workflow now uses a workflow call trigger, features updated action versions, and modifies the versioning and installation steps. Changes
Sequence Diagram(s)sequenceDiagram
participant Trigger as Event Trigger
participant RelJob as Publish Release Job
participant GitHub as GitHub Release API
participant TSJob as Publish TypeScript Job
Trigger->>RelJob: Initiate release process
RelJob->>GitHub: Create release (using new version variable & action v2.2.0)
Note over RelJob: Changelog verification removed
RelJob->>TSJob: Trigger publish-typescript job (dependency)
sequenceDiagram
participant Caller as Workflow Caller
participant PubJob as Publish Job (TypeScript)
participant Checkout as Checkout Action v4
participant NodeSetup as Setup Node v4
participant Buf as Buf Installer
participant npm as NPM Registry
Caller->>PubJob: Invoke via workflow_call
PubJob->>Checkout: Checkout code (fetch-depth: 0, fetch-tags: true)
PubJob->>NodeSetup: Configure Node environment
PubJob->>Buf: Install buf v1.47.2
PubJob->>PubJob: Set version using npm version from-git
PubJob->>npm: Publish package on NPM
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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
Documentation and Community
|
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: 2
🧹 Nitpick comments (1)
.github/workflows/publish-release.yml (1)
93-93
: Remove trailing spaces.Remove trailing spaces to fix the YAMLlint warning.
- git push --tags + git push --tags🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 93-93: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/publish-release.yml
(2 hunks).github/workflows/publish-typescript.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/publish-release.yml
[error] 93-93: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: rpcimportable
- GitHub Check: lint
- GitHub Check: build-zetanode
- GitHub Check: build-and-test
- GitHub Check: gosec
- GitHub Check: build
- GitHub Check: Analyze (go)
🔇 Additional comments (10)
.github/workflows/publish-typescript.yml (4)
4-4
: LGTM! Workflow reusability improvement.The addition of the
workflow_call
trigger enables this workflow to be called from other workflows, improving modularity and reuse.
6-6
: LGTM! Improved job naming.The job name change from 'build' to 'publish' better reflects its primary purpose of publishing to NPM.
10-13
: LGTM! Enhanced checkout configuration.The upgrade to
actions/checkout@v4
withfetch-depth: 0
andfetch-tags: true
ensures proper version management by fetching the complete history and all tags.
33-33
: LGTM! Improved version management.Using
npm version from-git
is a more standard approach that ensures version consistency with git tags..github/workflows/publish-release.yml (6)
73-74
: LGTM! Improved changelog extraction.The new approach correctly extracts only the current changelog section for the release notes.
78-78
: LGTM! Simplified version handling.The version handling has been simplified by using a consistent
GITHUB_TAG_VERSION
variable throughout the workflow.Also applies to: 83-83, 87-89, 92-92
108-108
: LGTM! Consistent version variable usage.The
GORELEASER_CURRENT_TAG
now uses the newGITHUB_TAG_VERSION
variable, maintaining consistency.
123-127
: LGTM! Improved attestation upload.Using the GitHub CLI for uploading attestations is a more robust approach.
132-132
: LGTM! Enhanced cleanup error handling.Added error handling and debugging message to the cleanup step.
134-137
: LGTM! Well-integrated TypeScript publishing.The new TypeScript publishing job is well-integrated:
- Correctly depends on publish-release completion
- Uses the updated workflow via workflow_call
- Properly inherits secrets
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.
Looks good to me.
workflow_call
Example run: https://github.com/zeta-chain/ci-testing-node/actions/runs/13292302894
Example release: https://github.com/zeta-chain/ci-testing-node/releases/tag/v0.0.1739384888
Summary by CodeRabbit