Skip to content

Build and release snap #18

Build and release snap

Build and release snap #18

Workflow file for this run

name: release
run-name: Build and release snap
on:
create:
branches: [main]
workflow_dispatch:
inputs:
channel:
description: Prerelease channel
required: true
type: choice
default: edge
options:
- candidate
- beta
- edge
jobs:
build:
if: ${{ inputs.channel || startsWith(github.ref, 'refs/tags/') }}
runs-on: ${{ matrix.builder }}
strategy:
matrix:
include:
- builder: ubuntu-latest
platform: amd64
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build
id: build
- uses: ./.github/actions/publish
with:
tag: ${{ github.ref_name }}
snap: ${{ steps.build.outputs.snap }}
channel: ${{ inputs.channel }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
release:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: "*.snap"
merge-multiple: true
- uses: ncipollo/release-action@v1
with:
bodyFile: RELEASE.md
artifacts: "${{ github.workspace }}/*.snap"
makeLatest: true
skipIfReleaseExists: true
artifactErrorsFailBuild: true