fluttergithub-actionsflutter-windows

CI/CD Flutter Windows Pipeline


Github is showing this error in the Actions while processing the jobs:

Run thedoctor0/zip-release@master
Run $GITHUB_ACTION_PATH/entrypoint.sh
D:\a\_actions\thedoctor0\zip-release\master/entrypoint.sh: line 10: cd: build/windows/runner/Release: No such file or directory


the thedoctor0/zip-release@master tryign to zip the release folder present in **build/windows/runner/Release** but the release folder is in
**build/windows/x64/runner/Release**

I want to change the directory path that can zip the relase folder

      - name: Debug Build Output
        run: |
          echo "Contents of build/windows/x64/runner/release:"
          ls build/windows/x64/runner/release
      - name: Package Release zip file
        uses: thedoctor0/zip-release@master

Solution

  • The issue i was encountering is due to the thedoctor0/zip-release@master action attempting to zip the release folder located at build/windows/runner/Release. However, my actual release folder is located at build/windows/x64/runner/Release. To resolve this, I need to specify the correct directory path using the with property of the thedoctor0/zip-release action.

    the property is with:

    name: Package Release zip file
    uses: thedoctor0/zip-release@master
    with:
      type: 'zip' 
      filename: project_name-${{github.ref_name}}-windows.zip 
      directory: build/windows/x64/runner/Release
    

    in directory write the whatever path you want but Before running the zip-release action, it's good practice to ensure the directory exists and contains the expected files. You can use a debug step like this:

    - name: Debug Build Output
      run: |
        echo "Contents of build/windows/x64/runner/release:"
        ls build/windows/x64/runner/release