forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.26 KB
/
snap.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
36
37
38
39
40
41
42
43
44
45
46
47
name: Snap
on:
workflow_dispatch:
push:
branches:
- snapcraft
schedule:
# run on each day
- cron: "33 4 * * *"
concurrency:
group: snap-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
name: Create snapcraft image
steps:
- name: Check secrets presence
id: checksecrets
shell: bash
run: |
if [ "SNAPCRAFT_LOGIN_FILE" == "" ]; then
echo ::set-output name=secretspresent::false
else
echo ::set-output name=secretspresent::true
fi
env:
SNAPCRAFT_LOGIN_FILE: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
- name: Checkout source
uses: actions/checkout@v2
# The image relies on https://builds.jabref.org/master/JabRef-5.0-portable_linux.tar.gz^
# See snap/snapcraft.yml for details
- name: Run snapcraft build
uses: snapcore/action-build@v1
id: snapcraft
with:
snapcraft-args: "--debug"
- name: Upload snap
if: ${{ steps.checksecrets.outputs.secretspresent }}
uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
snap: ${{ steps.snapcraft.outputs.snap }}
release: edge