Skip to content

Commit

Permalink
Create libmedium.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai authored Apr 20, 2024
1 parent 1be9289 commit 31afef8
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/libmedium.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

0 comments on commit 31afef8

Please sign in to comment.