Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno compile workflow not running #88

Open
MBeggiato opened this issue Oct 28, 2024 · 2 comments
Open

Deno compile workflow not running #88

MBeggiato opened this issue Oct 28, 2024 · 2 comments

Comments

@MBeggiato
Copy link

Hi,
I want to use Github Actions with Deno 2 to automaticaly compile to a executable. I got the workflow setup but now recive the
following error in the compile step:

Run deno compile --allow-write --allow-read --target x86_64-pc-windows-msvc --icon ./icon.ico --output ./build/windows/ConventionalFighter.exe main.ts

Download https://registry.npmjs.org/keypress
Check file:///D:/a/ConventionalFighter/ConventionalFighter/main.ts
Compile file:///D:/a/ConventionalFighter/ConventionalFighter/main.ts to ./build/windows/ConventionalFighter.exe
Download https://dl.deno.land/release/v2.0.3/denort-x86_64-pc-windows-msvc.zip
error: Writing deno compile executable to temporary file './build/windows\ConventionalFighter.exe.tmp-0b65dea24cd6b2cb'
Caused by:
The system cannot find the file specified. (os error 2)
Error: Process completed with exit code 1.

My workflow steps looks like this:

  build:
    runs-on: windows-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Deno
        uses: denoland/[email protected]

      - name: Build for Windows
        run: deno compile --allow-write --allow-read --target x86_64-pc-windows-msvc --icon ./icon.ico --output ./build/windows/ConventionalFighter.exe main.ts

      - name: Upload build artifact
        uses: actions/upload-artifact@v3
        with:
          name: ConventionalFighter-Windows
          path: ./build/windows/ConventionalFighter.exe
@mactkg
Copy link

mactkg commented Oct 29, 2024

I also encountered same issue on my new project mactkg/st.
I try to create small reproducing project, but somehow I can't.
(You can see logs trying to reproduce the issue at https://github.com/mactkg-playground/deno-compile-on-gh-repro/actions )

@MBeggiato You can see my code on https://github.com/mactkg/st. Could you find same things between your and my codebase? It may help to find causes.

@mactkg
Copy link

mactkg commented Oct 29, 2024

I made more time to reproduce this issue and finally succeeded in creating the smallest reproduction project.
https://github.com/mactkg-playground/deno-compile-on-gh-repro

I can't find the root cause, but it fails when an unused npm package is written in the deno.lock / deno.json file.

@MBeggiato Does it help you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants