Git Product home page Git Product logo

appcenter-github-action's Introduction

App Center Github Action

Sample workflow for App Center action

This action uploads artifacts (.apk or .ipa) to Visual Studio App Center.

Inputs

appName

Required username followed by App name e.g. wzieba/Sample-App

token

Required Upload token - you can get one from appcenter.ms/settings

group

Required Distribution group (or multiple groups split by ; delimiter)

file

Required Artifact to upload (.apk or .ipa)

buildVersion

Build version parameter required for .zip, .msi, .pkg and .dmg files

buildNumber

Build number parameter required for macOS .pkg and .dmg files

releaseNotes

Release notes visible on release page

gitReleaseNotes

Generate release notes based on the latest git commit

notifyTesters

If set to true, an email notification is sent to the distribution group

debug

If set to true, shows useful debug information from the action execution.

Requirements

This action is Docker-based. It means it can only execute on runners with a Linux operating system. See Github Actions documentation for details.

Sample usage

name: Build, code quality, tests

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: build release
      run: ./gradlew assembleRelease
    - name: upload artefact to App Center
      uses: wzieba/AppCenter-Github-Action@v1
      with:
        appName: wzieba/Sample-App
        token: ${{secrets.APP_CENTER_TOKEN}}
        group: Testers
        file: app/build/outputs/apk/release/app-release-unsigned.apk
        notifyTesters: true
        debug: false

appcenter-github-action's People

Contributors

bennettp123 avatar dobladov avatar mateuszkwiecinski avatar npsconsultingllc avatar okalman avatar tmorone-rezi avatar tonyarnold avatar vitalii-smal avatar wzieba avatar xom9ikk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appcenter-github-action's Issues

Question: how does this action handle multi-line release notes?

I've been calling the AppCenter CLI tool directly, and attempting to use the contents of ${{github.event.release.body}} to populate my release notes, however it appears that I need to do some pre-processing to convert the newlines/special characters to something more appropriate for use on the command line.

It doesn't look like this action does anything to help here, but I was thinking maybe it should?

Something simple to pre-process the incoming release notes text, or wrap the argument contents in a multiline argument directly would be super helpful.

Requires Login? Nothing in Script shows how to do this.

Error: Command 'appcenter distribute release' requires a logged in user. Use the 'appcenter login' command to log in.

Nothing in command shows how to do this, thought I just needed the Token which is in my github secrets for repo.

Response status code: 404

Hi there! I´m using that action but everytime my run fails...it looks like it can´t find my .apk, also, it shows 2 URL´s with some messages:

https://api.appcenter.ms/v0.1/apps/Lucas.Azevedo.23/mediservice/distribution_groups/Collaborators/members

https://api.appcenter.ms/v0.1/apps/Lucas.Azevedo.23/mediservice/release_uploads

Also, I run the action with the debug flag and here´s what I´ve got:

Run wzieba/AppCenter-Github-Action@v1
with:
appName: Lucas.Azevedo.23/mediservice
token: ***
group: Collaborators
file: /home/runner/work/mediservice/mediservice/platforms/android/app/build/outputs/apk/debug/app-debug.apk
notifyTesters: true
debug: true
env:
JAVA_HOME_8.0.265_x64: /opt/hostedtoolcache/jdk/8.0.265/x64
JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.265/x64
JAVA_HOME_8_0_265_X64: /opt/hostedtoolcache/jdk/8.0.265/x64
/usr/bin/docker run --name aac2aa315255cf0cc94afbab7645f26ad04118_d22213 --label aac2aa --workdir /github/workspace --rm -e JAVA_HOME_8.0.265_x64 -e JAVA_HOME -e JAVA_HOME_8_0_265_X64 -e INPUT_APPNAME -e INPUT_TOKEN -e INPUT_GROUP -e INPUT_FILE -e INPUT_NOTIFYTESTERS -e INPUT_DEBUG -e INPUT_BUILDVERSION -e INPUT_BUILDNUMBER -e INPUT_RELEASENOTES -e INPUT_GITRELEASENOTES -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/mediservice/mediservice":"/github/workspace" aac2aa:315255cf0cc94afbab7645f26ad04118
Using appcenter-cli version: 2.5.4
logFilter, request: {
"rawResponse": false,
"queryString": {},
"url": "https://api.appcenter.ms/v0.1/apps/Lucas.Azevedo.23/mediservice/distribution_groups/Collaborators/members",
"method": "GET",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"user-agent": "appcenterCli/2.5.4 NodeJS/v12.10.0 linux/5.4.0-1025-azure",
"x-api-token": ""
},
"body": null
}
Response status code: 404
Body: {"message":"Not found. Correlation ID: c4a26aec-d182-4249-9a2e-a5d47de87cb5","statusCode":404,"code":"Not Found"}
logFilter, request: {
"rawResponse": false,
"queryString": {},
"url": "https://api.appcenter.ms/v0.1/apps/Lucas.Azevedo.23/mediservice/release_uploads",
"method": "POST",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"user-agent": "appcenterCli/2.5.4 NodeJS/v12.10.0 linux/5.4.0-1025-azure",
"x-api-token": "
"
},
"body": null
}
Response status code: 404
Body: {"message":"Not found. Correlation ID: 62517c7f-f749-4dd2-a9e9-215baf4feb00","statusCode":404,"code":"Not Found"}
Error: failed to create release upload for /github/workspace/platforms/android/app/build/outputs/apk/debug/app-debug.apk

I´ve tried all the paths that I can, but everytime the run fails...

Any idea how to help me with this issue?

Thank you all in advance.

Desktop Application

I used to use app center to distribute my desktop application as ZIP file or Exe using Azure pipelines. will i be able to do the same with this Action ? or it only works for APK & ipa

Action not failing on errors

I used this action in one of my workflows and ran into an error. I just forgot to add the token as github secret. However, the workflow finished successfully despite the error. I then went to App Center and searched for the release. After a while I checked the workflow logs. The error was displayed correctly (I was not logged in).

Error: Command 'appcenter distribute release' requires a logged in user. Use the 'appcenter login' command to log in.

But as I stated earlier the action finished without failing, which is not correct. The expected behaviour is that the action fails, resulting in a failing workflow.

Import url in example is wrong

Your example code in the readme points to a non-existing repository:
Instead of
uses: wzieba/[email protected]
it should be
uses: wzieba/[email protected]
Which then points to this source: https://api.github.com/repos/wzieba/AppCenter-Github-Action/tarball/v1.0.0

Otherwise I get this error in my action:

Download action repository 'wzieba/[email protected]'
##[warning]Failed to download action 'https://api.github.com/repos/wzieba/App-Center-action/tarball/v1.0.0'. Error Response status code does not indicate success: 404 (Not Found).
##[warning]Back off 14.427 seconds before retry.
##[warning]Failed to download action 'https://api.github.com/repos/wzieba/App-Center-action/tarball/v1.0.0'. Error Response status code does not indicate success: 404 (Not Found).
##[warning]Back off 10.353 seconds before retry.
##[error]Response status code does not indicate success: 404 (Not Found).

Cant upload apk to app center

two day ago I have successful upload apk to appcenter, but now when upload to app center doesn't work send error like this.
Error: Command distribute release --token *** --app ***/*** --group QA --file app/build/outputs/bundle/developmentDebug/*.apk --release-notes [APK-Development] *message_commit* --silent --debug is invalid
image
image

Please use the latest version of the App Center CLI

Hi!

Previously working fine scripts are failing now.
Looks like appcenter-cli 2.5.4 backend API is deprecated now and the appcenter-cli needs to be updated to the latest 2.7.3 version in the plugin.

`/usr/bin/docker run --name afc9db4c5041c5805d342d63297a46_33b69f --label 179394 --workdir /github/workspace --rm -e JAVA_HOME_8.0.275_x64 -e JAVA_HOME -e JAVA_HOME_8_0_275_X64 -e SIGNED_RELEASE_FILE -e RELEASE_NOTES -e INPUT_APPNAME -e INPUT_TOKEN -e INPUT_GROUP -e INPUT_FILE -e INPUT_NOTIFYTESTERS -e INPUT_RELEASENOTES -e INPUT_DEBUG -e INPUT_BUILDVERSION -e INPUT_BUILDNUMBER -e INPUT_GITRELEASENOTES -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/xmp2go-/xmp2go-":"/github/workspace" 179394:52afc9db4c5041c5805d342d63297a46

Using appcenter-cli version: 2.5.4

logFilter, request: {
"rawResponse": false,
"queryString": {},
"url": "https://api.appcenter.ms/v0.1/apps/CoreWillSoft-GmbH/XMP2GO-1/distribution_groups/Testers/members",
"method": "GET",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"user-agent": "appcenterCli/2.5.4 NodeJS/v12.10.0 linux/5.4.0-1031-azure",
"x-api-token": "***"
},
"body": null
}

Response status code: 200
Body: [{"id":"b8080893-1f78-4918-8680-820e495209d2","display_name":"Irina Lubenets","email":"[email protected]","name":"irina.lubenets-corewillsoft.com","avatar_url":null,"can_change_password":false,"created_at":"2020-09-22T11:09:24.000Z","origin":"appcenter"},{"id":"7b7b39f0-a86c-4978-a629-be6343ec1e41","display_name":"Vladyslav Sumtsov","email":"[email protected]","name":"vlad.sumtsov-corewillsoft.com","avatar_url":null,"can_change_password":false,"created_at":"2019-09-05T14:41:21.000Z","origin":"hockeyapp"},{"id":"95f8a248-29d6-432b-87d2-e5e03bafaa6e","display_name":"Marie Dunaevskaya","email":"[email protected]","name":"marie.dunaevskaya-corewillsoft.com","avatar_url":null,"can_change_password":false,"created_at":"2020-04-07T12:07:38.000Z","origin":"appcenter"},{"id":"3004e479-6779-4dd5-9c8f-fd29627c087c","display_name":"Aleksandr Kozlov","email":"[email protected]","name":"alex.kozlov-corewillsoft.com","avatar_url":null,"can_change_password":false,"created_at":"2020-08-21T14:04:12.000Z","origin":"appcenter"}]

logFilter, request: {
"rawResponse": false,
"queryString": {},
"url": "https://api.appcenter.ms/v0.1/apps/CoreWillSoft-GmbH/XMP2GO-1/release_uploads",
"method": "POST",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"user-agent": "appcenterCli/2.5.4 NodeJS/v12.10.0 linux/5.4.0-1031-azure",
"x-api-token": "***"
},
"body": null
}

Response status code: 410
Body: {"code":"gone","message":"This API is deprecated. Please use the latest version of the App Center CLI: https://github.com/microsoft/appcenter-cli, or if you need a custom script please use the CLI as the basis for your implementation. (Support ID: b16fa247-3d47-4cab-b4fb-699b10fa7f9b)"}
Error: failed to create release upload for app/build/outputs/apk/beta/XMP2GO-beta-signed.apk`

AppCenter deployment failed today

I have not diagnosed this yet, but I did notice the CLI was upgraded but not released yet. My build failed today on both ios and android. Do we need this new CLI?

Error: failed to create release upload for release.ipa

Error: Command distribute release is invalid

Hello, I've been using your action for some time and all was working good, but today it stopped working. I get this error:
Error: Command distribute release --token *** --app App/Test --group Collaborators --file build/app/outputs/flutter-apk/app.apk --release-notes is invalid

yml:

      - name: upload artifact to App Center
        uses:  local/AppCenter-Github-Action@v1
        with:
          appName: ${{ env.UPLOAD_NAME }}
          token: ${{secrets.APP_CENTER_TOKEN}}
          group: Collaborators
          file: build/app/outputs/flutter-apk/${{ env.UPLOAD_APK_NAME }}
          notifyTesters: true
          debug: false

Any tips why it stopped working? Or how to get more info on the error

Container action is only supported on Linux

Github Actions Workflow:

    runs-on: macos-latest
    // ...
    - name: Upload to App Center
      uses: wzieba/[email protected]
      with:
        appName: company/appname
        token: ${{secrets.app_center}}
        group: Testers
        file: build/app/outputs/apk/release/app-release.apk (or .ipa)

Actions output:

##[group***Run wzieba/[email protected]
with:
  appName: company/appname
  token: ***
  group: Testers
  file: src/build/app/outputs/apk/release/app-release.apk
env:
  flutter_version: 1.17.5
  java_version: 12.x
  JAVA_HOME: /Users/runner/hostedtoolcache/jdk/12.0.2/x64
  JAVA_HOME_12.0.2_x64: /Users/runner/hostedtoolcache/jdk/12.0.2/x64
  FLUTTER_HOME: /Users/runner/hostedtoolcache/flutter/1.17.5-stable/x64
##[endgroup***
##[error***Container action is only supported on Linux

Seems like related with Docker: https://docs.github.com/en/actions/creating-actions/about-actions#types-of-actions

I propose to put on documentation some information about this constraint!

Unable to find apk

An error results when trying to upload to AppCenter
Command Failure at Error: ENOENT: no such file or directory, stat 'app/build/outputs/apk/release/Nimble_build*-qa-release.apk'

I use asterisk to replace the number values in the name. Also, I have a flavor (qa)
so should it be app/build/outputs/apk/qa/release

even if I add the /qa in the path above, i get the same mo such file error

Make release notes automatic?

I forked your repo just to add this: --release-notes "$(git log -1 --pretty=format:%s)" to the entrypoint.sh. Think its worth including in your repo?

Release ID not correctly determined

When distributing to multiple groups, the release number may not be correctly determined. The list of releases is not being sorted in reverse numerical order. This PR fixes that issue.
#16

Command distribute...is invalid

The action has worked well for us for 2 years, but since yesterday our builds have been failing with the error:

Error: Command distribute release --token *** --app XXX --group XXX --file /github/workspace/androidApp/build/outputs/apk/develop/release/androidApp-develop-release-unsigned-signed.apk --release notes --silent --debug is invalid

We have not changed anything in the action configuration or in AppCenter and therefore cannot explain the error.

Maybe related to microsoft/appcenter-cli#2397?

Error: Could not add group ... to release ...

For others, Google and probably my "future me":

If you create an group of testers on the organization level, you can see the following error, if you create the wrong kind of token

Error: Could not add group ... to release ...

Instead of creating an App API tokens (appcenter.ms > open application > open settings > App API tokens) you need to create an User API token.

To be honest: There is a slight hint in the token parmeter description already, but for security reasons I decided to create an App API token. For one workflow it worked but in some other workflow we distribute to some other project in MS App Center and there the very same step (matrix job) failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.