jhenstridge / snapcraft-build-action

Obsolete: use the @snapcore version:

Home Page:https://github.com/snapcore/action-build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

snapcraft-build-action status

Snapcraft Build Action

This is a Github Action that can be used to build a Snapcraft project. For most projects, the following workflow should be sufficient:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: jhenstridge/snapcraft-build-action@v1

This will install and configure LXD and Snapcraft, then invoke snapcraft to build the project.

It assumes that the Snapcraft project is at the root of the repository. If this is not the case, then the action can be configured with the path input parameter:

...
    - uses: jhenstridge/snapcraft-build-action@v1
      with:
        path: path-to-snapcraft-project

On success, the action will set the snap output parameter to the path of the built snap. This can be used to save it as an artifact of the workflow:

...
    - uses: jhenstridge/snapcraft-build-action@v1
      id: snapcraft
    - uses: actions/upload-artifact@v1
      with:
        name: snap
        path: ${{ steps.snapcraft.outputs.snap }}

Alternatively, it could be used to perform further testing on the built snap:

    - run: |
        sudo snap install --dangerous ${{ steps.snapcraft.outputs.snap }}
        # do something with the snap

About

Obsolete: use the @snapcore version:

https://github.com/snapcore/action-build

License:MIT License


Languages

Language:JavaScript 98.7%Language:C 0.7%Language:Meson 0.7%