Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Build and Publish

Build and Publish #28

name: Build and Publish
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build-amd64:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare Environment
run: bash build.sh --just-prepare
- name: Build snap for amd64
uses: snapcore/action-build@v1
- name: Upload amd64 snap as artifact
uses: actions/upload-artifact@v4
with:
name: snap-amd64
path: ./*.snap
if-no-files-found: error
build-arm64:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Prepare Environment
run: bash build.sh --just-prepare
- name: Install Snapcraft
run: sudo snap install snapcraft --classic
- name: Build snap for arm64
run: snapcraft pack --build-for arm64
- name: Upload arm64 snap as artifact
uses: actions/upload-artifact@v4
with:
name: snap-arm64
path: ./*.snap
if-no-files-found: error
publish:
name: Publish to Snap Store
runs-on: ubuntu-latest
needs: [ build-amd64, build-arm64 ]
steps:
- name: Download amd64 snap
uses: actions/download-artifact@v4
with:
name: snap-amd64
path: ./amd64_snap
- name: Download arm64 snap
uses: actions/download-artifact@v4
with:
name: snap-arm64
path: ./arm64_snap
- name: Get amd64 snap filename
id: amd64_snap_file
run: |
SNAP_FILE=$(find ./amd64_snap -name "*.snap")
echo "path=$SNAP_FILE" >> "$GITHUB_OUTPUT"
- name: Get arm64 snap filename
id: arm64_snap_file
run: |
SNAP_FILE=$(find ./arm64_snap -name "*.snap")
echo "path=$SNAP_FILE" >> "$GITHUB_OUTPUT"
- name: Publish amd64 snap
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ steps.amd64_snap_file.outputs.path }}
release: stable
- name: Publish arm64 snap
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ steps.arm64_snap_file.outputs.path }}
release: stable