-
Notifications
You must be signed in to change notification settings - Fork 32
feat: add new workflow that uploads the src dir to s3 on release #723
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
WalkthroughAdds a new GitHub Actions workflow that deploys the repository's Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant GH as GitHub Actions
participant Repo as Repository (src)
participant AWS_STS as AWS STS (AssumeRole)
participant S3 as S3 Bucket (s3://files.cow.fi/cow-sdk)
participant CF as CloudFront
GH->>Repo: checkout repository
GH->>AWS_STS: assume IAM role (from secret)
AWS_STS-->>GH: temporary AWS credentials
GH->>S3: aws s3 sync src -> s3://files.cow.fi/cow-sdk (--delete)
S3-->>GH: sync result
GH->>CF: create invalidation for /cow-sdk/* (using DISTRIBUTION)
CF-->>GH: invalidation response
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 GitHub Packages PublishedLast updated: Dec 2, 2025, 09:12:07 AM UTC The following packages have been published to GitHub Packages with pre-release version
InstallationThese packages require authentication to install from GitHub Packages. First, create a # Create .npmrc file in your project root
echo "@cowprotocol:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN" >> .npmrcTo get your GitHub token:
Then install any of the packages above, either by exact version (i.e. # Yarn
yarn add npm:@cowprotocol/cow-sdk@pr-723
# pnpm
pnpm install npm:@cowprotocol/cow-sdk@pr-723
# NPM
npm install npm:@cowprotocol/cow-sdk@pr-723Update to the latest version (only if you used the tag)Every commit will publish a new package. To upgrade to the latest version, run: # Yarn
yarn upgrade @cowprotocol/cow-sdk
# pnpm
pnpm update @cowprotocol/cow-sdk
# NPM
npm update @cowprotocol/cow-sdkView PackagesYou can view the published packages at: https://github.com/cowprotocol/cow-sdk/packages |
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: 3
🧹 Nitpick comments (1)
.github/workflows/deploy-to-s3.yml (1)
39-40: Document the DISTRIBUTION secret.The
DISTRIBUTIONsecret is used without explanation. Future maintainers won't know what it contains or how to update it.Add a comment explaining the secret:
+ # CloudFront distribution ID from repository secrets env: DIST_ID: ${{ secrets.DISTRIBUTION }}Also consider adding documentation in your repository's README or CONTRIBUTING.md:
### Secrets Configuration - **DISTRIBUTION**: CloudFront distribution ID for the cow-sdk distribution (e.g., `E1234567EXAMPLE`)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/deploy-to-s3.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: test
- GitHub Check: Build Package
- GitHub Check: Publish to GitHub Packages
- GitHub Check: eslint
limitofzero
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.
Thank you 🙏
Summary
This change adds a new github workflow, which on each release uploads the src folder to
files.cow.fi/cow-sdkso that we can use the chain images inswap.cow.fiand in the sdk.Testing
We after merging we can see if the worflow works successfuly and if we can access https://files.cow.fi/cow-sdk/bridging/providers/across/across-logo.png. There might be some secrets that need to be set up.
Background
This PR is part of https://linear.app/cowswap/issue/COW-136/token-lists-cdn
Moving away from our reliance on github CDN.
This is no longer viable as Github recently changed their rate limiting policy for non-logged in users.
Related PRs:
cowprotocol/cowswap#6591
#724
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.