Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request mobile-dev-inc#10 from mobile-dev-inc/release/1.3.0
Browse files Browse the repository at this point in the history
Release v1.3.0
  • Loading branch information
igorsmotto authored Feb 20, 2023
2 parents 357e798 + 7319c85 commit 2631848
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
*.bkp
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# Android

```yaml
- uses: mobile-dev-inc/action-maestro-cloud@v1.2.3
- uses: mobile-dev-inc/action-maestro-cloud@v1.3.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: app/build/outputs/apk/debug/app-debug.apk
Expand All @@ -47,7 +47,7 @@ jobs:
Include the Proguard mapping file to deobfuscate Android performance traces:

```yaml
- uses: mobile-dev-inc/action-maestro-cloud@v1.2.3
- uses: mobile-dev-inc/action-maestro-cloud@v1.3.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: app/build/outputs/apk/release/app-release.apk
Expand All @@ -57,7 +57,7 @@ Include the Proguard mapping file to deobfuscate Android performance traces:
# iOS

```yaml
- uses: mobile-dev-inc/action-maestro-cloud@v1.2.3
- uses: mobile-dev-inc/action-maestro-cloud@v1.3.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: <app_name>.app
Expand All @@ -69,7 +69,7 @@ Include the Proguard mapping file to deobfuscate Android performance traces:
### .dSYM file

```yaml
- uses: mobile-dev-inc/action-maestro-cloud@v1.2.3
- uses: mobile-dev-inc/action-maestro-cloud@v1.3.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: <app_name>.app
Expand All @@ -83,7 +83,7 @@ Include the Proguard mapping file to deobfuscate Android performance traces:
By default, the action is looking for a `.maestro` folder with Maestro flows in the root directory of the project. If you would like to customize this behaviour, you can override it with a `workspace` argument:

```yaml
- uses: mobile-dev-inc/action-maestro-cloud@v1.2.3
- uses: mobile-dev-inc/action-maestro-cloud@v1.3.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: app.zip
Expand All @@ -101,7 +101,7 @@ A name will automatically be provided according to the following order:
If you want to override this behaviour and specify your own name, you can do so by setting the `name` argument:

```yaml
- uses: mobile-dev-inc/action-maestro-cloud@v1.2.3
- uses: mobile-dev-inc/action-maestro-cloud@v1.3.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: app.zip
Expand All @@ -113,7 +113,7 @@ If you want to override this behaviour and specify your own name, you can do so
If you don't want the action to wait until the Upload has been completed as is the default behaviour, set the `async` argument to `true`:

```yaml
- uses: mobile-dev-inc/action-maestro-cloud@v1.2.3
- uses: mobile-dev-inc/action-maestro-cloud@v1.3.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: app.zip
Expand All @@ -125,7 +125,7 @@ If you don't want the action to wait until the Upload has been completed as is t
If you want to pass environment variables along with your upload, add a multiline `env` argument:

```yaml
- uses: mobile-dev-inc/action-maestro-cloud@v1.2.3
- uses: mobile-dev-inc/action-maestro-cloud@v1.3.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: app.zip
Expand All @@ -141,7 +141,7 @@ You can use Maestro (Tags)[https://maestro.mobile.dev/cli/tags] to filter which
You can either pass a single value, or comma-separated (`,`) values.

```yaml
- uses: mobile-dev-inc/action-maestro-cloud@v1.2.3
- uses: mobile-dev-inc/action-maestro-cloud@v1.3.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: app.zip
Expand Down
1 change: 1 addition & 0 deletions _release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if [[ -z "$VERSION" ]]; then
fi

ncc build index.ts
sed -i.bkp "s/action-maestro-cloud@v.*/action-maestro-cloud@v${VERSION}/g" README.md
git add -A
git commit --allow-empty -m "Version ${VERSION}"
git tag -a "v${VERSION}" -m "Version ${VERSION}"
Expand Down
20 changes: 18 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45435,7 +45435,7 @@ const getConsoleUrl = (uploadId, teamId, appId) => {
};
exports.getConsoleUrl = getConsoleUrl;
const run = () => __awaiter(void 0, void 0, void 0, function* () {
const { apiKey, apiUrl, name, appFilePath, mappingFile, workspaceFolder, branchName, commitSha, repoOwner, repoName, pullRequestId, env, async, androidApiLevel, } = yield (0, params_1.getParameters)();
const { apiKey, apiUrl, name, appFilePath, mappingFile, workspaceFolder, branchName, commitSha, repoOwner, repoName, pullRequestId, env, async, androidApiLevel, includeTags, excludeTags } = yield (0, params_1.getParameters)();
const appFile = yield (0, app_file_1.validateAppFile)(yield (0, archive_utils_1.zipIfFolder)(appFilePath));
if (!knownAppTypes.includes(appFile.type)) {
throw new Error(`Unsupported app file type: ${appFile.type}`);
Expand All @@ -45453,6 +45453,8 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
env: env,
agent: 'github',
androidApiLevel: androidApiLevel,
includeTags: includeTags,
excludeTags: excludeTags,
};
const { uploadId, teamId, targetId: appId } = yield client.uploadRequest(request, appFile.path, workspaceZip, mappingFile && (yield (0, archive_utils_1.zipIfFolder)(mappingFile)));
const consoleUrl = (0, exports.getConsoleUrl)(uploadId, teamId, appId);
Expand Down Expand Up @@ -45599,6 +45601,18 @@ function getInferredName() {
function getAndroidApiLevel(apiLevel) {
return apiLevel ? +apiLevel : undefined;
}
function parseTags(tags) {
if (tags === undefined || tags === '')
return [];
if (tags.includes(',')) {
const arrayTags = tags.split(',')
.map(it => it.trim());
if (!Array.isArray(arrayTags))
throw new Error("tags must be an Array.");
return arrayTags;
}
return [tags];
}
function getParameters() {
return __awaiter(this, void 0, void 0, function* () {
const apiUrl = core.getInput('api-url', { required: false }) || 'https://api.mobile.dev';
Expand All @@ -45610,6 +45624,8 @@ function getParameters() {
const mappingFile = mappingFileInput && (0, app_file_1.validateMappingFile)(mappingFileInput);
const async = core.getInput('async', { required: false }) === 'true';
const androidApiLevelString = core.getInput('android-api-level', { required: false });
const includeTags = parseTags(core.getInput('include-tags', { required: false }));
const excludeTags = parseTags(core.getInput('exclude-tags', { required: false }));
var env = {};
env = core.getMultilineInput('env', { required: false })
.map(it => {
Expand All @@ -45629,7 +45645,7 @@ function getParameters() {
const repoName = getRepoName();
const pullRequestId = getPullRequestId();
const androidApiLevel = getAndroidApiLevel(androidApiLevelString);
return { apiUrl, name, apiKey, appFilePath, mappingFile, workspaceFolder, branchName, commitSha, repoOwner, repoName, pullRequestId, env, async, androidApiLevel };
return { apiUrl, name, apiKey, appFilePath, mappingFile, workspaceFolder, branchName, commitSha, repoOwner, repoName, pullRequestId, env, async, androidApiLevel, includeTags, excludeTags };
});
}
exports.getParameters = getParameters;
Expand Down

0 comments on commit 2631848

Please sign in to comment.