-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (52 loc) · 1.36 KB
/
snap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: snap
on:
# Manually trigger this from the Actions tab
workflow_dispatch:
inputs:
release:
description: 'Release Type'
required: true
default: 'stable'
type: choice
options:
- lts
- stable
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
release:
- ${{ inputs.release }}
platform:
- amd64
- i386
- arm64
- armhf
continue-on-error: ${{ matrix.platform == 'armhf' }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: 1.8.0
arch: x64
- name: Generate snapcraft.yaml
run: |
cd scripts/
julia --project=. -e 'using Pkg; Pkg.instantiate()'
julia --project=. create-snapcraft-yaml.jl "${{ inputs.release }}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build Snap
uses: diddlesnaps/snapcraft-multiarch-action@v1
id: snapcraft
with:
architecture: ${{ matrix.platform }}
- name: Upload and Release
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_TOKEN }}
with:
snap: ${{ steps.snapcraft.outputs.snap }}
release: ${{ inputs.release == 'lts' && 'lts/stable' || inputs.release }}