-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
177 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,18 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. The format | ||
is based on [Keep a Changelog]. | ||
|
||
This project adheres to [Semantic Versioning]. | ||
|
||
## [Unreleased] | ||
|
||
## [1.0.0] - 2022-04-07 | ||
|
||
Initial public release. | ||
|
||
[Unreleased]: https://github.com/waldoapp/waldo-go-lib/compare/v1.0.0...HEAD | ||
[1.0.0]: https://github.com/waldoapp/waldo-go-lib/compare/81e8b45...v1.0.0 | ||
|
||
[Keep a Changelog]: https://keepachangelog.com | ||
[Semantic Versioning]: https://semver.org |
This file contains 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 |
---|---|---|
@@ -1 +1,76 @@ | ||
# waldoapp/gh-action-upload | ||
|
||
This GitHub Action uploads your build (`.app`, `.ipa`, or `.apk`) to Waldo. | ||
|
||
You must specify at least a build path and a Waldo upload token. | ||
|
||
Typically the build path is generated by a previous build action in your | ||
workflow. | ||
|
||
Each application registered in Waldo is associated with a unique upload token. | ||
You can find the upload token for your app by going to the Documentation screen | ||
for your app in [Waldo](https://app.waldo.io/). This token _should_ be | ||
specified as a _secret_ environment variable. | ||
|
||
## Inputs | ||
|
||
- `build_path` | ||
|
||
The path to your `.app`, `.ipa`, or `.apk` build. Typically the build path is | ||
generated by a previous build action in your workflow. **Required.** | ||
|
||
- `upload_token` | ||
|
||
The upload token associated with your app. Each application registered in | ||
Waldo is associated with a unique upload token. **Required.** | ||
|
||
- `variant_name` | ||
|
||
An optional variant name. This is an arbitrary string to associate with this | ||
build. | ||
|
||
- `git_commit` | ||
|
||
The originating git commit hash. This is the hash of the originating git | ||
commit (also known as the “git SHA”) for this build. If omitted, Waldo | ||
attempts to infer the git commit from the CI provider (if any) or from the | ||
current git repository (if accessible). | ||
|
||
- `git_branch` | ||
|
||
The originating git commit branch name. This is the branch name (if any) of | ||
the originating git commit for this build. If omitted, Waldo attempts to | ||
infer the git branch name from the CI provider (if any) or from the current | ||
git repository (if accessible). | ||
|
||
- `is_debug_mode` | ||
|
||
If this mode is enabled, additional debug information is printed. (Default: | ||
`false`.) | ||
|
||
## Usage | ||
|
||
```yaml | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build with Xcode | ||
run: | | ||
DERIVED_DATA_PATH=/tmp/YourApp-$(uuidgen) | ||
xcodebuild -project YourApp.xcodeproj \ | ||
-scheme YourApp \ | ||
-configuration Release \ | ||
-destination 'generic/platform=iOS Simulator' \ | ||
-derivedDataPath "$DERIVED_DATA_PATH" \ | ||
clean build | ||
echo "APP_DIR_PATH=${DERIVED_DATA_PATH}/Build/Products/Release-iphonesimulator/YourApp.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 }} | ||
``` |
This file contains 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,84 @@ | ||
name: 'Upload to Waldo' | ||
description: | | ||
Uploads your build (`.app`, `.ipa`, or `.apk`) to Waldo. | ||
inputs: | ||
build_path: | ||
description: > | ||
The path to your `.app`, `.ipa`, or `.apk` build. Typically the build | ||
path is generated by a previous build action in your workflow. | ||
required: true | ||
upload_token: | ||
description: > | ||
The upload token associated with your app. Each application registered in | ||
Waldo is associated with a unique upload token. | ||
required: true | ||
variant_name: | ||
description: > | ||
An optional variant name. This is an arbitrary string to associate with | ||
this build. | ||
required: false | ||
default: '' | ||
git_commit: | ||
description: > | ||
The originating git commit hash. This is the hash of the originating git | ||
commit (also known as the “git SHA”) for this build. If omitted, Waldo | ||
attempts to infer the git commit from the CI provider (if any) or from | ||
the current git repository (if accessible). | ||
required: false | ||
default: '' | ||
git_branch: | ||
description: > | ||
The originating git commit branch name. This is the branch name (if any) | ||
of the originating git commit for this build. If omitted, Waldo attempts | ||
to infer the git branch name from the CI provider (if any) or from the | ||
current git repository (if accessible). | ||
required: false | ||
default: '' | ||
is_debug_mode: | ||
description: > | ||
If this mode is enabled, additional debug information is printed. | ||
required: false | ||
default: false | ||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
if [ ! -e ${WALDO_CLI_BIN}/waldo ]; then | ||
bash -c "$(curl -fLs https://github.com/waldoapp/waldo-go-cli/raw/master/install-waldo.sh)" | ||
fi | ||
build_path=${{ inputs.build_path }} | ||
git_branch=${{ inputs.git_branch }} | ||
git_commit=${{ inputs.git_commit }} | ||
upload_token=${{ inputs.upload_token }} | ||
variant_name=${{ inputs.variant_name }} | ||
verbose=${{ inputs.is_debug_mode }} | ||
extra_options="" | ||
if [[ -n $variant_name ]]; then | ||
extra_options="${extra_options} --variant_name \"${variant_name}\"" | ||
fi | ||
if [[ -n $git_commit ]]; then | ||
extra_options="${extra_options} --git_commit \"${git_commit}\"" | ||
fi | ||
if [[ -n $git_branch ]]; then | ||
extra_options="${extra_options} --git_branch \"${git_branch}\"" | ||
fi | ||
if [[ $verbose == "true" ]]; then | ||
extra_options="${extra_options} --verbose" | ||
fi | ||
${WALDO_CLI_BIN}/waldo upload "$build_path" --upload_token "$upload_token" ${extra_options} | ||
env: | ||
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
WALDO_CLI_BIN: /usr/local/bin | ||
WALDO_WRAPPER_NAME_OVERRIDE: 'Custom' | ||
WALDO_WRAPPER_VERSION_OVERRIDE: '1.0.0' | ||
shell: bash | ||
branding: | ||
icon: upload-cloud | ||
color: blue |