-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (45 loc) · 1.92 KB
/
libmedium.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
name: LibMedium
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- run: sudo apt install -y git tar zip mingw-w64 pkg-config libssl-dev
- uses: brndnmtthws/[email protected]
with:
targets: x86_64-unknown-linux-gnu x86_64-pc-windows-gnu
- run: |
mkdir libmedium
cd libmedium/
git clone --depth 1 https://github.com/realaravinth/libmedium
cd libmedium/
cargo build --target x86_64-unknown-linux-gnu --release
mv target/x86_64-unknown-linux-gnu/release/libmedium ../libmedium_linux_x86_64
cargo build --target x86_64-pc-windows-gnu --release
mv target/x86_64-pc-windows-gnu/release/libmedium.exe ../libmedium_windows_x86_64.exe
cd ../
echo "debug = true
source_code = \"https://git.batsense.net/realaravinth/libmedium\"
cache = \"./var/\"
[server]
port = 10050
ip= \"127.0.0.1\"
domain = \"libmedium.localhost:8080\"
allow_registration = true
proxy_has_tls = false" > config.toml
cd ../
tar -czvf libmedium_linux_x86_64.tar.gz ./libmedium/libmedium_linux_x86_64 ./libmedium/config.toml
zip libmedium_windows_x86_64.zip ./libmedium/libmedium_windows_x86_64.exe ./libmedium/config.toml
mv libmedium_linux_x86_64.tar.gz binaries/
mv libmedium_windows_x86_64.zip binaries/
rm -fr libmedium/
- run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Update libmedium binaries"
- uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main