By default, Xcode Cloud workflow provides no test notes for TestFlight uploads. I'd like to have string with git commit message and git commit hash instead of "No test notes" message.
Is it possible?
By default, Xcode Cloud workflow provides no test notes for TestFlight uploads. I'd like to have string with git commit message and git commit hash instead of "No test notes" message.
Is it possible?
I'm wondering the same thing! Xcode Cloud seems great, but we need some way of populating the release notes in TestFlight. I have to believe there is a way.
I am also in same situation and could not find a way to add Release notes.
I've been wanting that since they first made Xcode Cloud available. It'd save a lot of time!
I would love to be able to do this automatically!
It would be a huge timesaver if this could be automated.
Yes, you can set the release note for a build in Xcode Cloud directly from the build process itself.
To set the release note for a build in Xcode Cloud, you can use the xcodebuild command-line tool, which is included in Xcode. When you run xcodebuild to create an archive, you can pass the XCODE_CLOUD_BUILD_NOTES environment variable to set the release notes for the build.
Here's an example command to create an archive with a release note using xcodebuild:
xcodebuild archive -workspace MyWorkspace.xcworkspace -scheme MyScheme -archivePath MyArchive.xcarchive XCODE_CLOUD_BUILD_NOTES="This is my release note"
In this example, the XCODE_CLOUD_BUILD_NOTES environment variable is set to "This is my release note".
This will be the release note that appears in the build details in Xcode Cloud.
Note that you can also set the XCODE_CLOUD_BUILD_NOTES environment variable in Xcode itself, by adding it to the "Environment Variables" section of your Xcode scheme's run configuration.
Hey @denismartin would you mind to explain where this command should be run? Build phase script run, CI script (pre or post) or where?
@hjupter have you found the solution ?
Automating the release notes is indeed important, pitty this one haven't was addressed yet
I think this is the solution you are looking for: https://developer.apple.com/documentation/xcode/including-notes-for-testers-with-a-beta-release-of-your-app
Basically you have to create a text file in the following location: MyApp > TestFlight > WhatToTest.en-US.txt
*You can create various localized versions if you want the notes to be available in other languages by replacing the locale code in the filename.
To automate it, you will want to run a script in the ci_scripts/ci_post_clone.sh
file that creates/updates that text file with your desired notes.
I don't think you will need to actually commit those changes since Xcode Cloud has already checked out your repository, but not 100% sure.
I haven't verified this all works yet, but I am about to start testing it out for our nightly QA builds by generating that file with the last 24hrs worth of commit messages. I'll post my results here once I go through the whole flow though.
@metolius Yup, it worked for us.
@someuser321123 Can you give more information of how would your ci_post_clone.sh file contain. This is not working for me after following the custom script here https://developer.apple.com/documentation/xcode/including-notes-for-testers-with-a-beta-release-of-your-app#Write-a-script-to-generate-content-dynamically
This is the log
Run ci_post_xcodebuild.sh script
Run command: 'cd /Volumes/workspace/repository/ci_scripts && CI_XCODEBUILD_EXIT_CODE=0 /bin/zsh /Volumes/workspace/repository/ci_scripts/ci_post_xcodebuild.sh'
Command executed successfully
Passed
No “What to test” notes files found at /Volumes/workspace/repository
Hi! I want to share my solution, initially, I was using the example script provided by Apple, but I encountered some problems. I think the problem is the ! (exclamation mark) in the example script.
Here is the revised script that worked for me:
if [[ -d "$CI_APP_STORE_SIGNED_APP_PATH" ]]; then
git fetch --deepen 1 && git log -1 --pretty=format:"%s" | cat > ../TestFlight/WhatToTest.en-US.txt
fi
the solution is simple but spread across threads and pages online. here is the easy copy-paste
create a folder ci_scripts
in the root of your project. then create a ci_post_xcodebuild.sh
file in that new folder. paste this in it:
#!/bin/zsh
# save as ci_scripts/ci_post_xcodebuild.sh in your project root
if [[ -d "$CI_APP_STORE_SIGNED_APP_PATH" ]]; then
TESTFLIGHT_DIR_PATH=../TestFlight
mkdir $TESTFLIGHT_DIR_PATH
git fetch --deepen 3 && git log -3 --pretty=format:"%s" | cat > $TESTFLIGHT_DIR_PATH/WhatToTest.en-US.txt
fi
replace 3
with how many past commits you want in your changelog