action-snapcraft icon indicating copy to clipboard operation
action-snapcraft copied to clipboard

Snap command not found

Open andirsun opened this issue 2 years ago • 0 comments

Hi! I am trying to use you action to upload my app with electron builder. I am facing this error

Build/release/release-2]   🐳  docker exec cmd=[node /var/run/act/actions/samuelmeuli-action-snapcraft@v1/index.js] user= workdir=
| 
| Installing Snapcraft for Linux…
| sudo: snap: command not found
| child_process.js:866
|     throw err;
|     ^
| 
| Error: Command failed: sudo snap install snapcraft --classic --channel stable
|     at checkExecSyncError (child_process.js:790:11)
|     at execSync (child_process.js:863:15)
|     at run (/run/act/actions/samuelmeuli-action-snapcraft@v1/index.js:15:2)
|     at runLinuxInstaller (/run/act/actions/samuelmeuli-action-snapcraft@v1/index.js:36:2)
|     at runAction (/run/act/actions/samuelmeuli-action-snapcraft@v1/index.js:71:3)
|     at Object.<anonymous> (/run/act/actions/samuelmeuli-action-snapcraft@v1/index.js:95:1)
|     at Module._compile (internal/modules/cjs/loader.js:1085:14)
|     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
|     at Module.load (internal/modules/cjs/loader.js:950:32)
|     at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
|   status: 1,
|   signal: null,
|   output: [ null, null, null ],
|   pid: 72,
|   stdout: null,
|   stderr: null
| }

And this is my workflow

# This is responsible for build and publish desktop apps for Linux, Windows and Mac os
# Example https://github.com/samuelmeuli/mini-diary/blob/master/.github/workflows/release.yml
name: Build/release

on: push

jobs:
  release:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]

    steps:
      - name: Check out Git repository
        uses: actions/checkout@v2

      - name: Install Node.js, NPM and Yarn
        uses: actions/setup-node@v1
        with:
          node-version: 14

      # - name: Install Snapcraft
      #   uses: samuelmeuli/action-snapcraft@v1
      #   # Only install Snapcraft on Ubuntu
      #   if: startsWith(matrix.os, 'ubuntu')
      #   with:
      #     # Log in to Snap Store
      #     snapcraft_token: ${{ secrets.snapcraft_token }}

      - name: Install Snapcraft with LXD
        uses: samuelmeuli/action-snapcraft@v1
        with:
          use_lxd: true
      - name: Build snap
        run: sg lxd -c 'snapcraft --use-lxd'

      - name: Build/release Electron app
        uses: samuelmeuli/action-electron-builder@v1
        with:
          # GitHub token, automatically provided to the action
          # (No need to define this secret in the repo settings)
          github_token: ${{ secrets.github_token }}

          # If the commit is tagged with a version (e.g. "v1.0.0"),
          # release the app after building
          release: ${{ startsWith(github.ref, 'refs/tags/v') }}

Any help ?

andirsun avatar Apr 05 '22 19:04 andirsun