-
Notifications
You must be signed in to change notification settings - Fork 2
99 lines (84 loc) · 2.88 KB
/
continuous.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Flatpak Build and Release (Continuous)
on:
push:
branches: ["flatter"]
permissions:
contents: write
jobs:
build-and-publish:
name: Build and Publish Flatpak (Continuous)
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Haskell
uses: haskell/actions/setup@v1
with:
ghc-version: '9.6.6'
cabal-version: '3.10.3.0'
- name: Cache Cabal packages
uses: actions/cache@v4
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-ghc-9.6.6-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-ghc-9.6.6-cabal-
- name: Update Cabal package list
run: |
cabal update
- name: Install Build Tools
run: |
sudo apt-get update
sudo apt-get install -y autoconf autogen automake libtool
- name: Install Qt5 Dependencies
run: |
sudo apt-get install -y qtdeclarative5-dev libqt5quick5 qt5-image-formats-plugins qttools5-dev-tools qtbase5-dev
- name: Install secp256k1 Library
run: |
git clone https://github.com/bitcoin-core/secp256k1 && \
cd secp256k1 && \
git checkout v0.5.1 && \
./autogen.sh && \
./configure --enable-module-schnorrsig --enable-module-extrakeys --enable-module-ecdh --enable-experimental --enable-module-recovery && \
make && \
sudo make install && \
cd ..
- name: Set Library Path
run: |
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/local.conf && sudo ldconfig
- name: Build with Cabal
run: |
cabal build
- name: Prepare Flatpak Build Files
run: |
cp $(cabal list-bin futr) flatpak/futr
- name: Import GPG Key
if: ${{ secrets.GPG_PRIVATE_KEY != '' }}
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Build with Flatter
uses: andyholmes/flatter@v0
with:
files: |
flatpak/com.futrnostr.futr.yml
arch: x86_64
gpg-sign: ${{ secrets.GPG_FINGERPRINT }}
upload-bundles: true
upload-pages-artifact: true
upload-pages-prefix: continuous
upload-pages-includes: |
flatpak/index.html
flatpak/futr-continuous.flatpakrepo
flatpak-builder-args: |
--default-branch=continuous
- name: Upload Flatpak Bundle
uses: actions/upload-artifact@v3
with:
name: futr-flatpak-continuous
path: com.futrnostr.futr-x86_64
retention-days: 7