title: Do I need to upload build folder to branch in order to make upload-artifact CI/CD work?
body: <p>I have been working on two separate branches</p>
  <blockquote>
  <ul>
  <li>trunk</li>
  <li>distribute</li>
  </ul>
  </blockquote>
  <p>CI/CD pipelines are setup on distribute branch. When push is made to distribute branch, CI/CD workflow triggers and do the jobs listed in the main.yml file.</p>
  <p>Here it is:</p>
  <pre class="lang-yaml prettyprint-override"><code>name: Build &amp; upload to Firebase App Distribution 
  
  on: [push]
  
  jobs:
    build:
      runs-on: ubuntu-latest
      steps:
  
      # This will checkout the current repo
      - name: Checkout
        uses: actions/checkout@v2.4.2
  
      # This will upload artifact (.apk) from your workflow
      - uses: actions/upload-artifact@v3
          with:
          name: release-apk
          path: build/app/outputs/flutter-apk/app-release.apk
  
      # Distribute to Testers using Firebase App Distribution service
      - name: Firebase App Distribution
        uses: wzieba/Firebase-Distribution-Github-Action@v1.3.3
        with:
          appId: ${{secrets.FIREBASE_APP_ID}}
          token: ${{secrets.FIREBASE_TOKEN}
          groups: Testers
          file: build/app/outputs/flutter-apk/app-release.apk
  </code></pre>
  <p>We have added /build/ in <code>.gitignore</code> so build folder won't be pushed to distribute branch. The only thing it contains is the <code>.github/workflow/main.yml</code> that will trigger the CI/CD workflow.</p>
  <p>Now the questions is,
  Do I need to remove <code>/build/</code> from <code>.gitignore</code> so my build folder will also be pushed to distribute branch where upload-artifact can pick the file from <code>build/app/outputs/flutter-apk/app-release.apk</code> declared in <code>main.yml</code> file?</p>
  <p>Another question; Where does upload-artifact picks the file? Whether it picks from the current branch (in my case; build folder is not present there)? Or it picks from the current local project directory? (in my case; build folder is present)</p>
  <p>This thing is confusing me too much :(
  Thanks.</p>
  <p>Here is the error:
  <a href="https://i.stack.imgur.com/3NgZy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3NgZy.png" alt="Note that: This CI/CD is running on distribute branch which have /build/ ignored in .gitignore file of this branch" /></a></p>