summaryrefslogtreecommitdiffstats
path: root/.github/workflows/appimage.yml
blob: f7b7ae0831e63651277056606329dc1cc5b946a7 (plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
---
name: appimage

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]
env:
  DESTDIR: ../AppDir

jobs:
  build-appimage:
    name: build AppImage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: install dependencies
        run: sudo apt-get install libjson-c-dev libssl-dev libdbus-1-dev libhugetlbfs-dev
      - uses: actions/setup-python@v4
        with:
          python-version: '3.x'
      - uses: BSFishy/meson-build@v1.0.3
        with:
          setup-options: >
            --werror
            --buildtype=release
            --prefix=/usr
            --force-fallback-for=libnvme
            -Dlibnvme:werror=false
          action: install
          meson-version: 0.61.2
      - name: build AppImage
        uses: AppImageCrafters/build-appimage@v1.3
        with:
          recipe: .github/AppImageBuilder.yml
      - uses: actions/upload-artifact@v3
        name: upload artifacts to github
        with:
          name: AppImage
          path: '*.AppImage*'

  deploy-appimage:
    name: deploy AppImage
    runs-on: ubuntu-latest
    needs: build-appimage
    if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
    steps:
      - name: Download artifact
        uses: dawidd6/action-download-artifact@v2
        with:
          workflow: ${{ github.event.workflow_run.workflow_id }}
          workflow_conclusion: success
      - name: FTP Deployer
        uses: sand4rt/ftp-deployer@v1.7
        with:
          sftp: true
          host: ${{ secrets.SFTP_SERVER }}
          port: 22
          username: ${{ secrets.SFTP_USERNAME }}
          password: ${{ secrets.SFTP_PASSWORD }}
          remote_folder: '/upload'
          local_folder: '.'
          cleanup: false
          include: '[ "*", "**/*" ]'
          exclude: '[".github/**", ".git/**", "*.env"]'