fix: make sure snapd and snapcraft gets installed in the Linux runner #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install Dependencies | |
run: npm install | |
- name: Install snapd | |
if: runner.os == 'ubuntu-latest' | |
run: sudo apt-get install -y snapd | |
- name: Install snapcraft | |
if: runner.os == 'ubuntu-latest' | |
run: sudo snap install snapcraft --classic | |
- name: Build for Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: npm run build:linux | |
- name: Build for macOS | |
if: matrix.os == 'macos-latest' | |
run: npm run build:mac | |
- name: Build for Windows | |
if: matrix.os == 'windows-latest' | |
run: npm run build:win | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-${{ matrix.os }} | |
path: | | |
dist/*.exe | |
dist/*.zip | |
dist/*.dmg | |
dist/*.AppImage | |
dist/*.snap | |
dist/*.deb | |
dist/*.rpm | |
dist/*.tar.gz | |
dist/*.yml | |
dist/*.blockmap | |
release: | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
files: | | |
dist-*/**/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |