expo / expo-github-action

Expo GitHub Action makes it easy to automate EAS builds or updates
MIT License
795 stars 77 forks source link

Expose build id when build step is completed #215

Closed hrmoller closed 1 year ago

hrmoller commented 1 year ago

Description of the feature

Expose the build ID in variables returned from build step.

Motivation

If you have the build ID at hand when generating e.g. a slack message you can also generate a installation link for your testers/users where they simply click the link to download the app.

byCedric commented 1 year ago

Hey @hrmoller! You should be able to get the build ID when running eas build --platform all --json --non-interactive. This command does show some logging, but at the end, it will output a json structure, somewhat similar like:

[
  {
    "id": "<buildUUID>",
    "status": "FINISHED",
    "platform": "ANDROID",
    "project": {
      "id": "<projectUUID>",
      "name": "<projectName>",
      ...
    },
    ...
  },
  {
    "id": "<buildUUID>",
    "status": "FINISHED",
    "platform": "IOS",
    "project": {
      "id": "<projectUUID>",
      "name": "<projectName>",
      ...
    },
    ...
]

You should be able to use that JSON to infer the build link. We've recently added link redirects to simplify the URLs for expo-github-action. You should be able to link by using the project.id and id fields, e.g.:

Check the eas build --help for more flags to tweak it to your preference. Hope this helps!

hrmoller commented 1 year ago

Thank you @byCedric

byCedric commented 1 year ago

The link redirect is being deployed as we speak :) Should be available within a couple of minutes.

ddennis commented 9 months ago

Hi i am looking for the same functionality, but i am not able to get the json output passed to the next step:

  - name: 🚀 Build app
    id: build_cmd
    run: eas build --profile ad-hoc --platform android --non-interactive  --json

  - name: write output
    run: echo ${{join(steps.build_cmd.outputs.*, '\n')}}

The value of the output is looks like this image