-
Notifications
You must be signed in to change notification settings - Fork 1
155 lines (147 loc) · 4.87 KB
/
hydrapp.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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: hydrapp CI
on:
push:
pull_request:
schedule:
- cron: "0 0 * * 0"
jobs:
build-linux:
runs-on: depot-ubuntu-22.04-32
permissions:
contents: read
strategy:
matrix:
target:
# io.loopholelabs.latensee
- id: hydrapp-apk.io.loopholelabs.latensee
src: .
pkg: .
exclude: deb|dmg|flatpak|msi|rpm|binaries|tests
tag: main
dst: out/*
- id: hydrapp-deb.io.loopholelabs.latensee
src: .
pkg: .
exclude: apk|dmg|flatpak|msi|rpm|binaries|tests
tag: main
dst: out/*
- id: hydrapp-dmg.io.loopholelabs.latensee
src: .
pkg: .
exclude: apk|deb|flatpak|msi|rpm|binaries|tests
tag: main
dst: out/*
- id: hydrapp-flatpak.io.loopholelabs.latensee
src: .
pkg: .
exclude: apk|deb|dmg|msi|rpm|binaries|tests
tag: main
dst: out/*
- id: hydrapp-msi.io.loopholelabs.latensee
src: .
pkg: .
exclude: apk|deb|flatpak|dmg|rpm|binaries|tests
tag: main
dst: out/*
- id: hydrapp-rpm.io.loopholelabs.latensee
src: .
pkg: .
exclude: apk|deb|flatpak|dmg|msi|binaries|tests
tag: main
dst: out/*
- id: hydrapp-binaries.io.loopholelabs.latensee
src: .
pkg: .
exclude: apk|deb|flatpak|dmg|msi|rpm|tests
tag: main
dst: out/*
- id: hydrapp-tests.io.loopholelabs.latensee
src: .
pkg: .
exclude: apk|deb|flatpak|dmg|msi|rpm|binaries
tag: main
dst: out/*
steps:
- name: Maximize build space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up hydrapp
run: |
curl -L -o /tmp/hydrapp "https://github.com/pojntfx/hydrapp/releases/download/release-main/hydrapp.linux-$(uname -m)"
sudo install /tmp/hydrapp /usr/local/bin
- name: Setup Java/APK keystore
working-directory: .
env:
JAVA_KEYSTORE: ${{ secrets.JAVA_KEYSTORE }}
run: echo "${JAVA_KEYSTORE}" | base64 -d >'/tmp/keystore.jks'
- name: Setup PGP key
working-directory: .
env:
PGP_KEY: ${{ secrets.PGP_KEY }}
run: echo "${PGP_KEY}" | base64 -d >'/tmp/pgp.asc'
- name: Build with hydrapp
working-directory: ${{ matrix.target.src }}
env:
HYDRAPP_JAVA_KEYSTORE: /tmp/keystore.jks
HYDRAPP_JAVA_KEYSTORE_PASSWORD: ${{ secrets.JAVA_KEYSTORE_PASSWORD }}
HYDRAPP_JAVA_CERTIFICATE_PASSWORD: ${{ secrets.JAVA_CERTIFICATE_PASSWORD }}
HYDRAPP_PGP_KEY: /tmp/pgp.asc
HYDRAPP_PGP_KEY_PASSWORD: ${{ secrets.PGP_KEY_PASSWORD }}
HYDRAPP_PGP_KEY_ID: ${{ secrets.PGP_KEY_ID }}
run: |
hydrapp build --config='./${{ matrix.target.pkg }}/hydrapp.yaml' --exclude='${{ matrix.target.exclude }}' \
--pull=true --tag='${{ matrix.target.tag }}' \
--dst="${PWD}/out/${{ matrix.target.pkg }}" --src="${PWD}" \
--concurrency="$(nproc)"
- name: Upload output
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target.id }}
path: ${{ matrix.target.dst }}
publish-linux:
runs-on: depot-ubuntu-22.04-32
permissions:
contents: write
pages: write
id-token: write
needs: build-linux
environment:
name: github-pages
url: ${{ steps.publish.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download output
uses: actions/download-artifact@v4
with:
path: /tmp/out
- name: Isolate the repositories
run: |
mkdir -p /tmp/github-pages
for dir in /tmp/out/*/; do
rsync -a "${dir}"/ /tmp/github-pages/
done
touch /tmp/github-pages/.nojekyll
- name: Add index for repositories
run: |
sudo apt update
sudo apt install -y tree
cd /tmp/github-pages/
tree --timefmt '%Y-%m-%dT%H:%M:%SZ' -T 'hydrapp Repositories' --du -h -D -H . -o 'index.html'
- name: Setup GitHub Pages
uses: actions/configure-pages@v5
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: /tmp/github-pages/
- name: Publish to GitHub pages
id: publish
uses: actions/deploy-pages@v4