Skip to content

Build and Publish

Build and Publish #2

name: Build and Publish
on:
workflow_dispatch: # Only enable manual runs for now
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Prepare Build Environment
- name: Prepare Environment
run: |
bash build.sh --just-prepare
# Step 3: Set up Snapcraft
- name: Set up Snapcraft
uses: snapcore/action-build@v1
id: build
with:
snapcraft-channel: stable
# Step 4: Validate the built Snap
- name: Validate Snap
uses: diddlesnaps/snapcraft-review-action@v1
with:
snap: ${{ steps.build.outputs.snap }}
isClassic: 'false'
# Step 5: Publish Snap
- name: Publish Snap Package
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{needs.build.outputs.snap-file}}
release: stable