Skip to content

Conversation

@graycreate
Copy link
Member

Improves base64 decoding with multiple fallback methods and better error handling

- Added validation for all required environment variables
- Implemented multiple base64 decoding methods as fallback
- Added automatic whitespace/newline removal if needed
- Added file verification to ensure API key was properly created
- Better error messages for debugging

This handles potential issues with:
- Different base64 command flags (-d vs --decode)
- Whitespace or newline characters in the secret
- Empty or missing secrets
Copilot AI review requested due to automatic review settings September 22, 2025 16:28
@graycreate graycreate merged commit c7cd4af into main Sep 22, 2025
5 of 6 checks passed
@graycreate graycreate deleted the bugfix/robust-base64-handling branch September 22, 2025 16:28
Copy link

Copilot AI left a 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 improves the robustness of base64 decoding for App Store Connect API keys in the GitHub Actions release workflow. The changes add multiple fallback methods for base64 decoding, comprehensive error handling, and validation to ensure the API key file is properly created and configured.

  • Enhanced base64 decoding with multiple fallback methods to handle different platform variations
  • Added environment variable validation and file verification checks
  • Improved error messages and debugging output for troubleshooting deployment issues

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

echo "APP_STORE_CONNECT_API_KEY_KEY_ID=$APP_STORE_CONNECT_KEY_ID" >> $GITHUB_ENV
echo "APP_STORE_CONNECT_API_KEY_ISSUER_ID=$APP_STORE_CONNECT_ISSUER_ID" >> $GITHUB_ENV
echo "APP_STORE_CONNECT_API_KEY_KEY=~/.appstoreconnect/private_keys/AuthKey_${APP_STORE_CONNECT_KEY_ID}.p8" >> $GITHUB_ENV
echo "APP_STORE_CONNECT_API_KEY_KEY=$KEY_PATH" >> $GITHUB_ENV
Copy link

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The KEY_PATH variable contains a tilde (~) which may not expand correctly when written to $GITHUB_ENV. Consider using $HOME instead of ~ or use an absolute path to ensure proper path resolution in subsequent workflow steps.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Code Coverage Report ❌

Current coverage: 0%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants