generated from MetaMask/metamask-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Yarnv3 upgrade #129
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
Open
jake-perkins
wants to merge
96
commits into
main
Choose a base branch
from
yarnv3-upgrade
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Yarnv3 upgrade #129
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
a75fa8b
e2e-env-action
jake-perkins ab67bec
add more deps
jake-perkins 22a7b88
fix cursor bug
jake-perkins 610d928
new action shas
jake-perkins 6ebb0f3
yarn install
jake-perkins f6e583d
yarn cache
jake-perkins e4322a4
cache act
jake-perkins 4a81330
fix sim device
jake-perkins bc2f52f
bundler-cache
jake-perkins 27eed96
try yarn.lock perf fix
jake-perkins c9e4d1e
cocoapods caching
jake-perkins f5c4f53
android tuning
jake-perkins 860c7d4
tuning
jake-perkins 4898cab
license-accepts
jake-perkins 8b76ea8
foundry agnostic
jake-perkins f1008f7
setup
jake-perkins 9884d8a
foundry ubuntu-mac-agnostic
jake-perkins 682cafb
act
jake-perkins 6a1ff90
foundry
jake-perkins 38bd065
foundry android
jake-perkins 2f5e2a6
remover chmod
jake-perkins a3ea5d4
act
jake-perkins 8f3fdcb
act
jake-perkins c7d9987
act
jake-perkins 90d1bd2
foundry
jake-perkins bfd20d8
act
jake-perkins 6d49bac
cfgs
jake-perkins b2e0ef3
ndk setup
jake-perkins c35dbc6
ndk
jake-perkins 9e75e06
ndk
jake-perkins dda3178
act
jake-perkins 03cd24b
licenses
jake-perkins 4b4e46f
android tools
jake-perkins 02ff9a9
e2e
jake-perkins 5695370
act
jake-perkins f399c35
act
jake-perkins 4d87552
upgrade default xcode-version
jake-perkins 929ddaa
e2e
jake-perkins d9de05d
lint
jake-perkins 18421e8
android-simulator
jake-perkins 93cf96a
android-act
jake-perkins db78229
fix emu bug
jake-perkins 37051d0
act
jake-perkins dade476
act
jake-perkins 8529256
emulator bugs
jake-perkins 3b49d84
android-sim
jake-perkins a4ca242
act
jake-perkins b1867a9
act
jake-perkins 860e85f
env
jake-perkins 032380e
update android default abi
jake-perkins eea10a6
act
jake-perkins 1366275
linting
jake-perkins 1a08796
Merge branch 'main' into e2e-env-actions
jake-perkins 367c013
always lay out simulator cfgs
jake-perkins d7a349b
E2e ubuntu runners (#87)
makemesteaks 4459e30
E2e env actions keystore (#90)
jake-perkins 4ee8ff1
keystore-integrations
jake-perkins 9e04cea
keystores
jake-perkins aa884d6
keystore
jake-perkins a4d8ac3
manage node version
jake-perkins a3cd1cb
Emulator configs (#88)
makemesteaks b748908
remove cocoapods caching
jake-perkins 8553525
fmt
jake-perkins 8f5b198
self hosted
makemesteaks a1f7d18
test
makemesteaks 2ead7cb
fail fast
makemesteaks 5b810c9
remove ndk because its already in the runner
makemesteaks 060107e
targets
jake-perkins d378d7d
fix-act
jake-perkins b3b5adf
slimmer pipeline
makemesteaks ef89e45
avd changes
makemesteaks c35da38
add pod vendor to path
jake-perkins 5a428da
ruby/gem troubleshooting
jake-perkins 4364187
pod verify
jake-perkins 93a7c6e
binstub
jake-perkins 1c024c7
binstub
jake-perkins 9a1f3b3
binstub
jake-perkins b622c5f
configs
jake-perkins c526726
supress partition list output
jake-perkins 3447281
ci
jake-perkins a345f7c
debugging
jake-perkins b532e7f
keystore debugs
jake-perkins 4f03564
configs
jake-perkins ed3592d
compare fingerprints
jake-perkins 51c3ae9
default-chain
jake-perkins 4eec245
codesignign config
jake-perkins e95f53d
test ssl
makemesteaks 6ac80cb
remove debugging
jake-perkins 394f14c
keychain
jake-perkins 5906de6
chore: retries (#122)
makemesteaks fb91d27
Revert "chore: retries (#122)"
makemesteaks 9e5ee8b
feat(INFRA-2932): add retry to yarn commands self hosted (#126)
bsgrigorov 2f1cdf9
add action to yarn v3 of setup-e2e-env
tommasini 197371d
shell bash added
tommasini 1d567b7
fix setup e2e env var w yarn v3
tommasini f1d2c36
chore: add retry to corepack step
alucardzom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
name: 'Configure Keystore' | ||
description: 'Assume an AWS role and fetch a secret into environment variables' | ||
|
||
inputs: | ||
aws-role-to-assume: | ||
description: 'The AWS IAM role to assume' | ||
required: true | ||
aws-region: | ||
description: 'The AWS region where the secret is stored' | ||
required: true | ||
secret-name: | ||
description: 'The name of the secret in AWS Secrets Manager' | ||
required: true | ||
platform: | ||
description: 'The platform for which the keystore is being configured (e.g., ios, android)' | ||
required: true | ||
target: | ||
description: 'The target for which the keystore is being configured (e.g., qa, flask, main)' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Determine signing secret name | ||
shell: bash | ||
run: | | ||
case "${{ inputs.target }}" in | ||
qa) | ||
SECRET_NAME="metamask-mobile-qa-signing-certificates" | ||
;; | ||
flask) | ||
SECRET_NAME="metamask-mobile-flask-signing-certificates" | ||
;; | ||
main) | ||
SECRET_NAME="metamask-mobile-main-signing-certificates" | ||
;; | ||
*) | ||
echo "❌ Unknown target: ${{ inputs.target }}" | ||
exit 1 | ||
;; | ||
esac | ||
echo "AWS_SIGNING_CERT_SECRET_NAME=$SECRET_NAME" >> "$GITHUB_ENV" | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ inputs.aws-role-to-assume }} | ||
aws-region: ${{ inputs.aws-region }} | ||
|
||
- name: Fetch secret and export as environment variables | ||
shell: bash | ||
run: | | ||
echo "🔐 Fetching secret from Secrets Manager..." | ||
secret_json=$(aws secretsmanager get-secret-value \ | ||
--region "${{ inputs.aws-region }}" \ | ||
--secret-id "${AWS_SIGNING_CERT_SECRET_NAME}" \ | ||
--query SecretString \ | ||
--output text) | ||
|
||
keys=$(echo "$secret_json" | jq -r 'keys[]') | ||
for key in $keys; do | ||
value=$(echo "$secret_json" | jq -r --arg k "$key" '.[$k]') | ||
echo "::add-mask::$value" | ||
echo "$key=$(printf '%s' "$value")" >> "$GITHUB_ENV" | ||
echo "✅ Set secret for key: $key" | ||
done | ||
|
||
- name: Configure Android Signing Certificates | ||
if: inputs.platform == 'android' | ||
shell: bash | ||
run: | | ||
echo "📦 Configuring Android keystore..." | ||
if [[ -z "$ANDROID_KEYSTORE" ]]; then | ||
echo "⚠️ ANDROID_KEYSTORE is not set. Skipping keystore decoding." | ||
exit 1 | ||
fi | ||
|
||
# Use provided path if set, fallback to default | ||
KEYSTORE_PATH="${ANDROID_KEYSTORE_PATH:-/tmp/android.keystore}" | ||
echo "$ANDROID_KEYSTORE" | base64 --decode > "$KEYSTORE_PATH" | ||
echo "✅ Android keystore written to $KEYSTORE_PATH" | ||
|
||
- name: Configure iOS Signing Certificates | ||
if: inputs.platform == 'ios' | ||
shell: bash | ||
run: | | ||
echo "📦 Configuring iOS code signing..." | ||
|
||
# Create paths | ||
CERT_PATH="$RUNNER_TEMP/build_certificate.p12" | ||
PROFILE_PATH="$RUNNER_TEMP/build_pp.mobileprovision" | ||
KEYCHAIN_PATH="$RUNNER_TEMP/app-signing.keychain-db" | ||
CERT_PW="${IOS_SIGNING_KEYSTORE_PASSWORD}" | ||
|
||
# Decode base64 files | ||
echo "$IOS_SIGNING_KEYSTORE" | base64 --decode > "$CERT_PATH" | ||
echo "$IOS_SIGNING_PROFILE" | base64 --decode > "$PROFILE_PATH" | ||
echo "✅ Decoded .p12 and provisioning profile" | ||
|
||
# Create and unlock keychain | ||
security create-keychain -p "$CERT_PW" "$KEYCHAIN_PATH" | ||
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH" | ||
security unlock-keychain -p "$CERT_PW" "$KEYCHAIN_PATH" | ||
|
||
# Import cert | ||
echo "🔐 Importing certificate..." | ||
if ! security import "$CERT_PATH" -P "$CERT_PW" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"; then | ||
echo "❌ Failed to import certificate. Check if the password is correct or the .p12 is valid." | ||
exit 1 | ||
fi | ||
echo "✅ Certificate imported" | ||
|
||
# Set key partition list | ||
echo "🔑 Setting key partition list..." | ||
if ! security set-key-partition-list -S apple-tool:,apple: -k "$CERT_PW" "$KEYCHAIN_PATH" 2>/dev/null; then | ||
echo "❌ Failed to set key partition list. Codesigning tools may not have access." | ||
exit 1 | ||
fi | ||
echo "✅ Key partition list set" | ||
|
||
|
||
# Verify signing identities | ||
echo "🔍 Verifying code signing identities in keychain..." | ||
IDENTITIES=$(security find-identity -p codesigning "$KEYCHAIN_PATH") | ||
|
||
if ! echo "$IDENTITIES" | grep -q "Valid identities"; then | ||
echo "❌ No valid code signing identities found in keychain." | ||
echo "$IDENTITIES" | ||
exit 1 | ||
fi | ||
|
||
# Extract and print alias (first CN string) | ||
CERT_ALIAS=$(echo "$IDENTITIES" | awk -F '"' '/"Apple/ {print $2; exit}') | ||
if [[ -n "$CERT_ALIAS" ]]; then | ||
echo "✅ Code signing identity available: $CERT_ALIAS" | ||
else | ||
echo "✅ Code signing identity is available (alias not parsed)" | ||
fi | ||
|
||
# Install provisioning profile | ||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | ||
cp "$PROFILE_PATH" ~/Library/MobileDevice/Provisioning\ Profiles/ | ||
echo "✅ Installed provisioning profile" | ||
|
||
echo "Configuring default keychain" | ||
security default-keychain -s "$KEYCHAIN_PATH" | ||
echo "✅ default keychain set" | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Bug: Unused Required Parameter Causes Confusion
The
secret-name
input is required but unused. The action instead derives the secret name from thetarget
input, which can cause confusion for users providing an ignored parameter.