All Projects β†’ samuelmeuli β†’ action-snapcraft

samuelmeuli / action-snapcraft

Licence: MIT license
🐦 GitHub Action for setting up Snapcraft

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to action-snapcraft

overview
Automate your workflows with GitHub actions for MATLAB.
Stars: ✭ 40 (+17.65%)
Mutual labels:  ci, github-action
qodana-action
βš™οΈ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+229.41%)
Mutual labels:  ci, github-action
changie
Automated changelog tool for preparing releases with lots of customization options
Stars: ✭ 180 (+429.41%)
Mutual labels:  ci, release-automation
Goreleaser
Deliver Go binaries as fast and easily as possible
Stars: ✭ 9,290 (+27223.53%)
Mutual labels:  release-automation, snapcraft
changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+2055.88%)
Mutual labels:  ci, github-action
Action Electron Builder
:electron: GitHub Action for building and releasing Electron apps
Stars: ✭ 317 (+832.35%)
Mutual labels:  ci, release-automation
generate-changelog
generates changelog from git based on jira tickets
Stars: ✭ 18 (-47.06%)
Mutual labels:  ci, release-automation
github-action-benchmark
GitHub Action for continuous benchmarking to keep performance
Stars: ✭ 592 (+1641.18%)
Mutual labels:  ci, github-action
Android Snapshot Publisher
Gradle plugin to deploy Android Snapshot Versions
Stars: ✭ 145 (+326.47%)
Mutual labels:  ci, release-automation
Action Automatic Releases
READONLY: Auto-generated mirror for https://github.com/marvinpinto/actions/tree/master/packages/automatic-releases
Stars: ✭ 127 (+273.53%)
Mutual labels:  ci, release-automation
actions
A Collection of GitHub Actions
Stars: ✭ 91 (+167.65%)
Mutual labels:  ci, release-automation
github-create-release-action
Create a GitHub release from a Tag
Stars: ✭ 33 (-2.94%)
Mutual labels:  ci, release-automation
k8s-buildkite-plugin
Run any buildkite build step as a Kubernetes Job
Stars: ✭ 37 (+8.82%)
Mutual labels:  ci
drevops
πŸ’§ + 🐳 + βœ“βœ“βœ“ + πŸ€– + ❀️ Build, Test, Deploy scripts for Drupal using Docker and CI/CD
Stars: ✭ 55 (+61.76%)
Mutual labels:  ci
docker-coala-base
coala base docker image
Stars: ✭ 20 (-41.18%)
Mutual labels:  ci
netlify-plugin-cache
⚑ Generic plugin for caching any files and/or folders between Netlify builds
Stars: ✭ 19 (-44.12%)
Mutual labels:  ci
flagsmith-js-client
Javascript Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 42 (+23.53%)
Mutual labels:  ci
arduino-lint
Tool to check for problems with Arduino projects
Stars: ✭ 63 (+85.29%)
Mutual labels:  ci
release-helper
πŸ€– A GitHub Action that help you publish release.
Stars: ✭ 27 (-20.59%)
Mutual labels:  ci
swarmci
Swarm CI - Docker Swarm-based CI system or enhancement to existing systems.
Stars: ✭ 48 (+41.18%)
Mutual labels:  ci

Snapcraft Action

GitHub Action for setting up Snapcraft

Overview

This action…

  • Installs Snapcraft on Ubuntu 18.04+/macOS
  • Optionally logs you in to the Snap Store
  • Allows you to run Snapcraft commands in your GitHub Actions workflows

Note that the more recently created snapcore/action-build and snapcore/action-publish effectively copy the use_lxd strategy (below). Building using this actions still takes ~3:30 min less time than snapcore/action-build.

Usage

Basic

To use this action, add the following step to your workflow:

- name: Install Snapcraft
  uses: samuelmeuli/action-snapcraft@v1

A full example:

name: My workflow

on: push

jobs:
  my-job:
    runs-on: ubuntu-18.04

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

      - name: Install Snapcraft
        uses: samuelmeuli/action-snapcraft@v1

      # You can now run Snapcraft shell commands
      - name: Use Snapcraft
        run: snapcraft --help

Log in

This action can also log you in to the Snap Store. For this to work, you need an Ubuntu One account.

You will also need a Snap Store login token. To obtain one, run the following command on your machine:

snapcraft export-login --snaps SNAP_NAME --channels edge -

NOTE: You will need to manually push a package to the Snap Store to get a valid SNAP_NAME first.

Copy that token and add it as a secret to GitHub Actions. You can do this in your GitHub repository under Settings β†’ Secrets. The secret must be called snapcraft_token.

Finally, add the following option to your workflow step:

- name: Install Snapcraft
  uses: samuelmeuli/action-snapcraft@v1
  with:
    snapcraft_token: ${{ secrets.snapcraft_token }}
    skip_install: true # optional, if already installed in an earlier step

Build using LXD

LXD (runs-on: ubuntu-18.04) is for now likely the easiest way to get snapcraft to build snaps. This is an alternative to using multipass (GitHub VMs give the error launch failed: CPU does not support KVM extensions. when trying to use multipass).

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

Development

Suggestions and contributions are always welcome! Please discuss larger changes via issue before submitting a pull request.

Currently maintained by @casperdcl.

Related

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].