GitHub Actions
Waldo integration with GitHub Actions requires you only to add the Upload to Waldo
action to your workflow:
jobs:
build:
steps:
#...
#... (generate .app and save path as APP_PATH to $GITHUB_ENV)
#...
- name: Upload build to Waldo
uses: waldoapp/gh-action-upload@v1
with:
build_path: ${{ env.APP_PATH }}
upload_token: ${{ secrets.WALDO_UPLOAD_TOKEN }}
Important: If you use the
Checkout
V2 or V3 action in your workflow, you must setfetch-depth: 0
. Otherwise, Waldo CLI will not be able to correctly identify the git commit and branch associated with your build.Note: The value you supply to the
upload_token
input should be specified as a “secret” environment variable by going to the GitHub Settings tab in your repository, selecting the Secrets Actions menu, and assigning your upload token toWALDO_UPLOAD_TOKEN
. (Your app’s upload token is 0123456789abcdef0123456789abcdef.)Make sure you use your "CI Token" (you can find it in: Sidebar > Configuration > General. We make sure tokens used in CI are only scoped to a specific app, as a result CI uploads won't work with your User token (that you can find in user menu > Account settings > Profile).
Complete workflow example
Here is a complete example workflow that checks out the source code for an app from git, builds the app with Xcode, and uploads the simulator build to Waldo:
name: Build and upload ExampleApp
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-upload-sim:
name: Build and upload (simulator)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build with Xcode
run: |
DERIVED_DATA_PATH=/tmp/ExampleApp-$(uuidgen)
xcodebuild -project ExampleApp.xcodeproj \
-scheme ExampleApp \
-configuration Release \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath "$DERIVED_DATA_PATH" \
clean build
echo "APP_DIR_PATH=${DERIVED_DATA_PATH}/Build/Products/Release-iphonesimulator/ExampleApp.app" >>$GITHUB_ENV
- name: Upload build to Waldo
uses: waldoapp/gh-action-upload@v1
with:
build_path: ${{ env.APP_DIR_PATH }}
upload_token: ${{ secrets.WALDO_UPLOAD_TOKEN_SIM }}
is_debug_mode: true
Updated 3 months ago