r0adkll / sign-android-release

A GitHub action to sign an APK or AAB
MIT License
362 stars 137 forks source link

Error: ENOENT: no such file or directory, scandir 'app/build/outputs/bundle/release' #62

Open ljunquera opened 2 years ago

ljunquera commented 2 years ago

I am getting this error:

Run r0adkll/sign-android-release@v1 Preparing to sign key @ app/build/outputs/bundle/release with signing key Error: ENOENT: no such file or directory, scandir 'app/build/outputs/bundle/release'

I see in other posts that the app/build/outputs/bundle/[build flavor]release, but that's not where it is going on my machine, it goes to [app]/mobile/release. I expect there is a way to configure this, but am having trouble finding it.

I have also tried with releaseDirectory: app/mobile/release but got the same error.

When running:

- name: Sign Android release
  uses: r0adkll/sign-android-release@v1
  with:
    releaseDirectory: app/build/outputs/bundle/release
    signingKeyBase64: ${{ secrets.SIGNING_KEY }}
    alias: ${{ secrets.ALIAS }}
    keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
    keyPassword: ${{ secrets.KEY_PASSWORD }}

The prior steps executed successfully:

steps:
- name: checkout
  uses: actions/checkout@v3.0.1
- name: set up JDK 1.8
  uses: actions/setup-java@v3.1.1
  with:
    distribution: 'zulu'
    java-version: '8'

- name: Grant execute permission for gradlew
  run: chmod +x gradlew

- name: Build with Gradle
  id: build
  run: ./gradlew build

- name: Build Release AAB
  id: buildRelease
  run: ./gradlew bundleRelease
renatojobal commented 1 year ago

Maybe the release on the machine of Github is not putting the release over [app]/mobile/release. You could check this by running this step after the Build release AAB:

      - name: Log files
        run: |
          ls -al app/mobile/release
          ls -al app/build/outputs/bundle/release

You could put the output here to check what is happening.

domenicovent commented 1 year ago

hello here, I am facing the same issue, which is kind of odd. I tried troubleshooting it, and I got this in the logs:

image

All seems fine, the aab file is there, but can't be seen it

langsmith commented 7 months ago

Seeing the same thing. Has anyone figured this out? 🤔

domenicovent commented 7 months ago

@langsmith I didn't have time to try further, but a possibility is that the action is not using the working-directory setting. So it starts always from the root of the repo

DraqueT commented 7 months ago

@domenicovent I just wanted to confirm your theory here. After messing with this for a decent amount of time, it absolutely has to do with working-directory.

I separated my single step into two steps, with all of the parts that required a working-directory into the first, and access to the file in the second (which omitted working-directory). All of a sudden everything started working and I could see the file.

Surkhojb commented 3 months ago

Hi @DraqueT Could you share how you separated the step into two steps so I can make my build work successfully? I am stuck with the bundle singing.

DraqueT commented 3 months ago

@Surkhojb Ultimately I used a workaround. Part of the process I am using uploads the file to an external location that I have access to. I just pull it from there again so that I don't need to access the local path.