-
Notifications
You must be signed in to change notification settings - Fork 865
35 lines (33 loc) · 1.12 KB
/
snapcraft.yml
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
name: snapcraft
on:
workflow_dispatch:
inputs:
manual_name:
required: true
description: 'Release number to publish'
default: 'v0.0.0'
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Strip 'v' prefix
id: name
run: |
TAG=${{ github.event.inputs.manual_name || github.event.release.name }}
echo "SNAP_RELEASE_NAME=${TAG#v}" >> $GITHUB_ENV
- name: Download .snap artifact
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4 # v1.1.1
with:
repo: ipfs/ipfs-desktop
version: tags/v${{ env.SNAP_RELEASE_NAME }}
file: ipfs-desktop-${{ env.SNAP_RELEASE_NAME }}-linux-amd64.snap
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Snapcraft
uses: snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40 # v1.2.0
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
with:
snap: ipfs-desktop-${{ env.SNAP_RELEASE_NAME }}-linux-amd64.snap
release: stable