-
Notifications
You must be signed in to change notification settings - Fork 51
chore: simplify CI/CD env file handling #311
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
base: main
Are you sure you want to change the base?
Conversation
- Use single .env file per project instead of variant-specific files - Move SENTRY_TAG to misc_*.ts files for build variant metadata - Remove env file copying from iOS Xcode schemes (keep only misc.ts copy) - Simplify Android build.gradle to use single .env file - Update GitHub workflows to use env-file secret/variable - Remove ENV_RELAY_URL (library has default value) - Update READMEs with clearer setup instructions This simplifies the build configuration by: 1. AppKit uses vars.APPKIT_ENV_FILE (non-sensitive) 2. WalletKit uses secrets.WALLETKIT_ENV_FILE (contains API key)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @ignaciosantise's task in 2m 13s —— View job Review Complete: CI/CD env file handling simplificationFound 1 issue(s)Issue 1: GitHub Variable used for potentially sensitive dataID: release-dapp-appkit-env-exposure-a3f2 AppKit workflow uses The PR description states "AppKit uses Recommendation: Use secrets:
env-file: ${{ secrets.APPKIT_ENV_FILE }}Rationale: Even if data is considered "non-sensitive," storing configuration in Secrets provides:
Automated Checks🔒 External Domain URLs Detected (Non-blocking) New documentation references to external domains:
These are legitimate third-party service documentation links in setup instructions. No action required. ✅ No workflow security issues detected Review SummaryThis PR successfully simplifies CI/CD configuration by consolidating variant-specific env files into a single Key observations:
The architecture simplification is sound. The main concern is the security posture of using GitHub Variables vs Secrets for configuration data. |
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.
Pull request overview
This PR simplifies CI/CD environment file handling by consolidating variant-specific environment files (.env.debug, .env.internal, .env.production) into a single .env file per project. The variant-specific metadata (SENTRY_TAG) is now managed through TypeScript files that are copied at build time.
Changes:
- Environment configuration consolidated from multiple variant-specific
.envfiles to a single.envfile - Sentry environment tags moved from env files to
SENTRY_TAGconstants in variant-specificmisc_*.tsfiles - GitHub workflows updated to use consolidated
env-filesecrets instead of individual configuration parameters - Relay URL configuration simplified to use library defaults instead of explicit environment variable
Reviewed changes
Copilot reviewed 36 out of 39 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wallets/rn_cli_wallet/src/utils/misc.ts | Added SENTRY_TAG constant for production variant |
| wallets/rn_cli_wallet/src/utils/WalletKitUtil.ts | Simplified relay URL to use library default instead of ENV_RELAY_URL |
| wallets/rn_cli_wallet/src/screens/App.tsx | Updated Sentry initialization to use SENTRY_TAG from misc.ts |
| wallets/rn_cli_wallet/scripts/misc_*.ts | Added SENTRY_TAG constants for each build variant |
| wallets/rn_cli_wallet/scripts/copy-sample-files.sh | Updated to copy .env instead of .env.debug |
| wallets/rn_cli_wallet/ios/*.xcscheme | Removed .env file copying, kept misc.ts copying |
| wallets/rn_cli_wallet/ios/Podfile.lock | Updated CocoaPods version and dependency versions |
| wallets/rn_cli_wallet/declarations.d.ts | Removed ENV_RELAY_URL and ENV_SENTRY_TAG declarations |
| wallets/rn_cli_wallet/android/app/build.gradle | Simplified to use single .env file |
| wallets/rn_cli_wallet/README.md | Updated setup instructions for single .env file |
| wallets/rn_cli_wallet/.env.example | Removed variant-specific instructions and ENV_RELAY_URL |
| dapps/W3MWagmi/src/utils/misc.ts | Updated metadata to production defaults and added SENTRY_TAG |
| dapps/W3MWagmi/src/App.tsx | Updated Sentry initialization to use SENTRY_TAG from misc.ts |
| dapps/W3MWagmi/scripts/misc_*.ts | Added SENTRY_TAG constants for each build variant |
| dapps/W3MWagmi/scripts/copy-sample-files.sh | Updated to copy .env instead of .env.debug |
| dapps/W3MWagmi/ios/*.xcscheme | Updated to copy variant misc files |
| dapps/W3MWagmi/ios/Podfile.lock | Updated CocoaPods version |
| dapps/W3MWagmi/android/app/build.gradle | Simplified to use single .env file |
| dapps/W3MWagmi/README.md | Updated setup instructions for single .env file |
| dapps/W3MWagmi/.gitignore | Added blank line |
| dapps/W3MWagmi/.env.example | Removed variant-specific instructions |
| .github/workflows/release--ios-.yaml | Updated to use env-file secret instead of individual parameters |
| .github/workflows/release--android-.yaml | Updated to use env-file secret instead of individual parameters |
| .github/workflows/release-ios-base.yaml | Removed individual secret parameters, added env-file handling and variant file copying |
| .github/workflows/release-android-base.yaml | Removed individual secret parameters, added env-file handling and variant file copying |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Create unified release-appkit.yaml (replaces 4 dapp workflows) - Create unified release-walletkit.yaml (replaces 4 wallet workflows) - Create unified release-pos.yaml (replaces 4 POS workflows) - Remove unused env-file-path input from base workflows - Add e2e-build option for S3 uploads (AppKit SDK repo E2E tests) - Use workflow_dispatch inputs for platform/release-type selection Benefits: - 53% fewer workflow files (17 → 8) - Single source of truth per project - Better UX with dropdown menus in GitHub Actions
|
@claude review |
|
Claude finished @ignaciosantise's task in 1m 49s —— View job Review Complete: CI/CD env file handling simplificationFound 1 issue(s)Issue 1: Env file secret not validated as non-emptyID: android-base-env-empty-7a3c The workflow writes the env file from secrets without validating that the secret is non-empty. If Same issue exists in release-ios-base.yaml:159. Recommendation: Add validation before creating the env file: - name: Create env file
run: |
if [ -z "${{ secrets.env-file }}" ]; then
echo "Error: env-file secret is empty or not set"
exit 1
fi
echo "${{ secrets.env-file }}" > ${{ inputs.root-path }}/.envAutomated Checks🔒 External Domain URLs Detected (Non-blocking) New documentation references to external domains detected in README files:
These are legitimate third-party service documentation links in setup instructions. No action required. ✅ No workflow security issues detected Review SummaryThis PR successfully simplifies CI/CD configuration by:
Key observations:
The architecture is sound and the consolidation reduces maintenance burden significantly. The main suggestion is defensive validation for missing secrets to provide clearer error messages. |
Temporary stubs to enable workflow_dispatch from feature branches. Will be replaced by full implementation when PR #311 is merged.
Temporary stubs to enable workflow_dispatch from feature branches. Will be replaced by full implementation when PR #311 is merged.
Summary
Simplifies CI/CD configuration with two major improvements:
1. Single
.envfile per project.envinstead of variant-specific files (.env.debug,.env.internal,.env.production)SENTRY_TAGtomisc_*.tsfiles for build variant identification.envfile2. Consolidated CI/CD workflows (12 → 3 files)
release-appkit.yaml- Replaces 4 dapp workflowsrelease-walletkit.yaml- Replaces 4 wallet workflowsrelease-pos.yaml- Replaces 4 POS workflowsflowchart LR subgraph Before["Before (12 files)"] direction TB B1["release-dapp-android-internal"] B2["release-dapp-android-production"] B3["release-dapp-ios-internal"] B4["release-dapp-ios-production"] B5["release-wallet-android-internal"] B6["release-wallet-android-production"] B7["release-wallet-ios-internal"] B8["release-wallet-ios-production"] B9["release-pos-android"] B10["release-pos-legacy-android"] B11["release-pos-ios"] B12["release-pos-ios-legacy"] end subgraph After["After (3 files)"] direction TB A1["release-appkit.yaml<br/>├─ platform: android/ios<br/>├─ release-type: internal/prod<br/>└─ e2e-build: true/false"] A2["release-walletkit.yaml<br/>├─ platform: android/ios<br/>├─ release-type: internal/prod<br/>└─ e2e-build: true/false"] A3["release-pos.yaml<br/>├─ platform: android/ios<br/>└─ variant: production/legacy"] end Before --> AfterWorkflow Features
Changes Summary
ENV_RELAY_URL(library has default)APPKIT_ENV_FILE,WALLETKIT_ENV_FILE,POS_ENV_FILEenv-file-pathinput from base workflowsRequired Manual Steps
After merging, create/update these GitHub Secrets:
Test Plan
Release AppKitworkflow (android + internal)Release AppKitworkflow (ios + internal)Release WalletKitworkflow (android + internal)Release WalletKitworkflow (ios + internal)Release Mobile POSworkflow