0

I'm quite new to using Actions, and I'm having some trouble. My YML file looks like this:

name: Build
on:
  workflow_dispatch:
  push:
    branches: ["main", "master"]
jobs:
  build:
    runs-on: windows-latest
    steps:
      - name: Build with py2exe
        run: |
          pip install py2exe
          cd app
          python setup.py py2exe

I'm trying to compile app/main.py into a .exe file. I'm able to run these commands from my Windows 10 computer, but with Actions, it fails with:

Line |
   3 |  cd app
     |  ~~~~~~
     | Cannot find path 'D:\a\Pokemon-PythonRed\Pokemon-PythonRed\app' because it does not exist.

I'm sure there's an app directory, you can check for yourself here.

What am I doing wrong? Thank you in advance.

silvncr
  • 35
  • 7

1 Answers1

1

You need to check out the repo to access it in the workflow:

https://github.com/actions/checkout

frippe
  • 1,329
  • 1
  • 8
  • 15
  • The Action runs now, so thanks! But I don't see the changed files in the Repo. Do I need a separate command to save the files, or even create a Release? – silvncr Jan 03 '22 at 14:25
  • Correction to the previous comment: "Do I need..." to "Can I use..." Sorry for the second reply. – silvncr Jan 03 '22 at 14:42
  • 1
    It's a different question, so it's best to post a new question here to keep things organized. But yeah, you need to and you can. There's an official action to create a release that you can use – frippe Jan 03 '22 at 14:54
  • Sure, thanks again! – silvncr Jan 03 '22 at 15:01